ThemeController constructor
ThemeController(
- SettingsStore _settings, {
- required bool prefersDark(),
- void onApply(
- ResolvedTheme theme
Creates a controller, restoring the persisted preference from settings.
Implementation
ThemeController(this._settings, {required this.prefersDark, this.onApply})
: mode = Observable(ThemeMode.parse(_settings.theme)) {
_applyNow();
}