day_night_switcher 0.2.0+1 copy "day_night_switcher: ^0.2.0+1" to clipboard
day_night_switcher: ^0.2.0+1 copied to clipboard

A simple day / night switcher widget made in pure Dart. Allows to quickly show a beautiful dark mode switcher widget to your users.

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 :

DayNightSwitcher(
  isDarkModeEnabled: isDarkModeEnabled,
  onStateChanged: (isDarkModeEnabled) {
    setState(() {
      this.isDarkModeEnabled = isDarkModeEnabled;
    });
  },
),

The other one is very similar :

DayNightSwitcherIcon(
  isDarkModeEnabled: isDarkModeEnabled,
  onStateChanged: (isDarkModeEnabled) {
    setState(() {
      this.isDarkModeEnabled = isDarkModeEnabled;
    });
  },
),

Contributions #

You have a lot of options to contribute to this project ! You can :

165
likes
140
points
9
downloads

Publisher

verified publisherskyost.eu

Weekly Downloads

A simple day / night switcher widget made in pure Dart. Allows to quickly show a beautiful dark mode switcher widget to your users.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

flutter

More

Packages that depend on day_night_switcher