ThemeRepository constructor
ThemeRepository(
- ThemeProvider _localDataProvider
Implementation
ThemeRepository(this._localDataProvider) {
final result = _localDataProvider.getTheme();
_themeMode = switch (result) {
'light' => ThemeMode.light,
'dark' => ThemeMode.dark,
_ => ThemeMode.light,
};
saveTheme();
}