diff --git a/lib/helpers/preferences_helper.dart b/lib/helpers/preferences_helper.dart index 62e08f7..a2bad80 100644 --- a/lib/helpers/preferences_helper.dart +++ b/lib/helpers/preferences_helper.dart @@ -74,8 +74,7 @@ class PreferencesHelper { /// Get all settings as an [ApplicationPreferences] object ApplicationPreferences get preferences => ApplicationPreferences( - enableDarkMode: - getBool(PreferencesKeyList.ENABLE_DARK_THEME, alternative: null), + enableDarkMode: getBool(PreferencesKeyList.ENABLE_DARK_THEME), ); } diff --git a/lib/models/application_preferences.dart b/lib/models/application_preferences.dart index 36f221e..151d9ac 100644 --- a/lib/models/application_preferences.dart +++ b/lib/models/application_preferences.dart @@ -9,5 +9,5 @@ class ApplicationPreferences { const ApplicationPreferences({ @required this.enableDarkMode, - }); + }) : assert(enableDarkMode != null); }