Make Settingsfields nullable part 2

main
Kai Mannweiler 2023-02-27 11:21:57 +01:00
parent 28e46d1806
commit d46dd3ff7b
1 changed files with 9 additions and 9 deletions

View File

@ -52,16 +52,16 @@ Future<void> loadSettingsFromLocalJSON() async {
}
void saveSettings(Settings settings) {
_setIntSetting('group', settings.group);
_setIntSetting('group', settings.group!);
_setStringListSetting('relapse_categories', settings.relapseCategories!);
_setStringListSetting('mood_query_days', settings.moodQuery.days!);
_setIntSetting('mood_query_hours', settings.moodQuery.hours);
_setIntSetting('mood_query_minutes', settings.moodQuery.minutes);
_setStringListSetting('sleep_query_days', settings.sleepQuery.days!);
_setIntSetting('sleep_query_hours', settings.sleepQuery.hours);
_setIntSetting('sleep_query_minutes', settings.sleepQuery.minutes);
_setStringListSetting('mood_query_days', settings.moodQuery!.days!);
_setIntSetting('mood_query_hours', settings.moodQuery!.hours!);
_setIntSetting('mood_query_minutes', settings.moodQuery!.minutes!);
_setStringListSetting('sleep_query_days', settings.sleepQuery!.days!);
_setIntSetting('sleep_query_hours', settings.sleepQuery!.hours!);
_setIntSetting('sleep_query_minutes', settings.sleepQuery!.minutes!);
if (settings.chessTime != null) {
_setIntSetting('chess_hours', settings.chessTime!.hours);
_setIntSetting('chess_minutes', settings.chessTime!.minutes);
_setIntSetting('chess_hours', settings.chessTime!.hours!);
_setIntSetting('chess_minutes', settings.chessTime!.minutes!);
}
}