Add initilized field for Settingsprovider

main
Kai Mannweiler 2023-02-27 11:08:38 +01:00
parent ba558adecb
commit b1c6288b2b
1 changed files with 3 additions and 0 deletions

View File

@ -5,8 +5,10 @@ import '../models/settings.dart';
class SettingsProvider extends ChangeNotifier {
Settings? _settings;
bool _initialized = false;
Settings? get settings => _settings;
bool get initialized => _initialized;
SettingsProvider() {
initSettings();
@ -30,6 +32,7 @@ class SettingsProvider extends ChangeNotifier {
QueryConfig(moodHours ?? 0, moodMinutes ?? 0, moodDays),
QueryConfig(sleepHours ?? 0, sleepMinutes ?? 0, sleepDays),
TimeConfig(chessHours ?? 0, chessMinutes ?? 0));
_initialized = group != 0 ? true : false;
notifyListeners();
}
}