diff --git a/lib/views/home/settings/general_settings/settings_state.dart b/lib/views/home/settings/general_settings/settings_state.dart index 5a58cf0..4448efb 100644 --- a/lib/views/home/settings/general_settings/settings_state.dart +++ b/lib/views/home/settings/general_settings/settings_state.dart @@ -73,12 +73,17 @@ class GeneralSettingsState extends CoreProvier { Future getSettingsFromStorage() async { appState = AppState.busy; - _notificationTimeRange[0] = int.parse( - await StorageService.getValue(key: 'notificationTimeRangeStart'), - ); - _notificationTimeRange[1] = int.parse( - await StorageService.getValue(key: 'notificationTimeRangeEnd'), - ); + try { + _notificationTimeRange[0] = int.parse( + await StorageService.getValue(key: 'notificationTimeRangeStart'), + ); + _notificationTimeRange[1] = int.parse( + await StorageService.getValue(key: 'notificationTimeRangeEnd'), + ); + } catch (e) { + notificationTimeRange = [0, 0]; + } + _fontFamily = await StorageService.getValue(key: 'fontFamily'); _brightness = await StorageService.getValue(key: 'brightness'); final scale = await StorageService.getValue(key: 'fontSizeScale');