ThemeRepository constructor

ThemeRepository(
  1. ThemeProvider _localDataProvider
)

Implementation

ThemeRepository(this._localDataProvider) {
  final result = _localDataProvider.getTheme();

  _themeMode = switch (result) {
    'light' => ThemeMode.light,
    'dark' => ThemeMode.dark,
    _ => ThemeMode.light,
  };

  saveTheme();
}