correção de bugs, creação propria para turmas, e preparação para criar quizzes
This commit is contained in:
@@ -32,10 +32,12 @@ class SettingsNotifier extends StateNotifier<SettingsState> {
|
||||
SettingsNotifier()
|
||||
: super(
|
||||
SettingsState(
|
||||
themeMode: ThemeService.getThemeMode(),
|
||||
themeMode: ThemeMode.light,
|
||||
isDarkModeAvailable: ThemeService.isDarkModeAvailable(),
|
||||
),
|
||||
);
|
||||
) {
|
||||
loadSettings();
|
||||
}
|
||||
|
||||
/// Set theme mode
|
||||
Future<void> setThemeMode(ThemeMode themeMode) async {
|
||||
@@ -60,10 +62,8 @@ class SettingsNotifier extends StateNotifier<SettingsState> {
|
||||
Future<void> resetSettings() async {
|
||||
state = state.copyWith(isLoading: true);
|
||||
await ThemeService.resetTheme();
|
||||
state = state.copyWith(
|
||||
themeMode: ThemeService.getThemeMode(),
|
||||
isLoading: false,
|
||||
);
|
||||
final themeMode = await ThemeService.getStoredThemeMode();
|
||||
state = state.copyWith(themeMode: themeMode, isLoading: false);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user