A theme manager for light, dark, and system themes.
A theme manager that supports light, dark, and system default themes. State is retained and applied upon application start. Heavily inspired by dynamic_theme by Norbert Kozsir.
Getting Started
Add theme_manager to your project.
dependencies:theme_manager:^2.0.4
run flutter packages get and import theme_manager
import'package:theme_manager/theme_manager.dart';
A dialog is provided that can switch between themes.
The system default will load either light or dark based on the device preferences. If your device
changes themes at sunset or sunrise then light/dark mode will apply automatically.
The BrightnessPreference is saved in SharedPreferences automatically. There is also a clear
function to remove the preferences.