Add initilized field for Settingsprovider
parent
ba558adecb
commit
b1c6288b2b
|
@ -5,8 +5,10 @@ import '../models/settings.dart';
|
||||||
|
|
||||||
class SettingsProvider extends ChangeNotifier {
|
class SettingsProvider extends ChangeNotifier {
|
||||||
Settings? _settings;
|
Settings? _settings;
|
||||||
|
bool _initialized = false;
|
||||||
|
|
||||||
Settings? get settings => _settings;
|
Settings? get settings => _settings;
|
||||||
|
bool get initialized => _initialized;
|
||||||
|
|
||||||
SettingsProvider() {
|
SettingsProvider() {
|
||||||
initSettings();
|
initSettings();
|
||||||
|
@ -30,6 +32,7 @@ class SettingsProvider extends ChangeNotifier {
|
||||||
QueryConfig(moodHours ?? 0, moodMinutes ?? 0, moodDays),
|
QueryConfig(moodHours ?? 0, moodMinutes ?? 0, moodDays),
|
||||||
QueryConfig(sleepHours ?? 0, sleepMinutes ?? 0, sleepDays),
|
QueryConfig(sleepHours ?? 0, sleepMinutes ?? 0, sleepDays),
|
||||||
TimeConfig(chessHours ?? 0, chessMinutes ?? 0));
|
TimeConfig(chessHours ?? 0, chessMinutes ?? 0));
|
||||||
|
_initialized = group != 0 ? true : false;
|
||||||
notifyListeners();
|
notifyListeners();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue