From d46dd3ff7b31637f7bfb45df3059c460ac4f884e Mon Sep 17 00:00:00 2001 From: "k.mannweiler" <2012491@stud.hs-mannheim.de> Date: Mon, 27 Feb 2023 11:21:57 +0100 Subject: [PATCH] Make Settingsfields nullable part 2 --- lib/services/settings_service.dart | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/lib/services/settings_service.dart b/lib/services/settings_service.dart index 52028bd..c046cd2 100644 --- a/lib/services/settings_service.dart +++ b/lib/services/settings_service.dart @@ -52,16 +52,16 @@ Future 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!); } }