daynightswitch
a day night switch widget for flutter.
installation
add to pubspec.yaml.
dependencies:
day_night_switch:
usage
to use plugin, just import package import 'package:day_night_switch/day_night_switch.dart';
example
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;
});
},
)
Comments are closed.