Make Settingsfields nullable part 2
parent
28e46d1806
commit
d46dd3ff7b
|
@ -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!);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue