A day night switch widget for Flutter.

Add to pubspec.yaml.

dependencies: day_night_switch:

To use plugin, just import package import 'package:day_night_switch/day_night_switch.dart';

DayNightSwitch( value: val, moonImage: AssetImage('assets/moon.png'), sunImage: AssetImage('assets/sun.png'), sunColor: sunColor, moonColor: moonColor, dayColor: dayColor, nightColor: nightColor, onChanged: (value) { setState(() { val = value; }); }, )