From b1c6288b2b296401174bc360731a7bf3a9248138 Mon Sep 17 00:00:00 2001 From: "k.mannweiler" <2012491@stud.hs-mannheim.de> Date: Mon, 27 Feb 2023 11:08:38 +0100 Subject: [PATCH] Add initilized field for Settingsprovider --- lib/providers/settings_provider.dart | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/providers/settings_provider.dart b/lib/providers/settings_provider.dart index 71efb11..d7a2e0f 100644 --- a/lib/providers/settings_provider.dart +++ b/lib/providers/settings_provider.dart @@ -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(); } }