Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/skyost/daynightswitcher
A simple day / night switcher widget made in pure Dart.
https://github.com/skyost/daynightswitcher
dart day-night-mode day-night-switch flutter library
Last synced: 12 days ago
JSON representation
A simple day / night switcher widget made in pure Dart.
- Host: GitHub
- URL: https://github.com/skyost/daynightswitcher
- Owner: Skyost
- License: mit
- Created: 2020-03-06T14:16:58.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2023-03-21T22:45:05.000Z (over 1 year ago)
- Last Synced: 2024-10-23T05:35:30.859Z (16 days ago)
- Topics: dart, day-night-mode, day-night-switch, flutter, library
- Language: Dart
- Homepage: https://pub.dev/packages/day_night_switcher
- Size: 2.28 MB
- Stars: 38
- Watchers: 5
- Forks: 16
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
# DayNightSwitcher
Just a simple simple day / night switcher widget made in pure Dart.
It allows you to quickly show a beautiful dark mode switcher widget to your users.## How to use ?
Using this plugin is pretty straightforward. You have two widgets : `DayNightSwitcher` and `DayNightSwitcherIcon`.
Here's a sample code for `DayNightSwitcher` :
```dart
DayNightSwitcher(
isDarkModeEnabled: isDarkModeEnabled,
onStateChanged: (isDarkModeEnabled) {
setState(() {
this.isDarkModeEnabled = isDarkModeEnabled;
});
},
),
```The other one is very similar :
```dart
DayNightSwitcherIcon(
isDarkModeEnabled: isDarkModeEnabled,
onStateChanged: (isDarkModeEnabled) {
setState(() {
this.isDarkModeEnabled = isDarkModeEnabled;
});
},
),
```## Contributions
You have a lot of options to contribute to this project ! You can :
* [Fork it](https://github.com/Skyost/DayNightSwitcher/fork) on Github.
* [Submit](https://github.com/Skyost/DayNightSwitcher/issues/new/choose) a feature request or a bug report.
* [Donate](https://paypal.me/Skyost) to the developer.
* [Watch a little ad](https://www.clipeee.com/creator/skyost) on Clipeee.