simple_theme_switcher 0.0.7
simple_theme_switcher: ^0.0.7 copied to clipboard
Simple light/dark mode switcher using material theme.Just wrap your App with STMaterialApp Widget and toggle it with a switch.
Use this package as a library
Depend on it
Run this command:
With Flutter:
$ flutter pub add simple_theme_switcherThis will add a line like this to your package's pubspec.yaml (and run an implicit flutter pub get):
dependencies:
simple_theme_switcher: ^0.0.7Alternatively, your editor might support flutter pub get. Check the docs for your editor to learn more.
Import it
Now in your Dart code, you can use:
import 'package:simple_theme_switcher/simple_theme_switcher.dart';