@@ -6,18 +6,6 @@ import 'package:menstrudel/models/themes/app_theme_mode_enum.dart';
66enum PeriodHistoryView { list, journal }
77
88class SettingsService {
9- static const String _notificationsEnabledKey = 'notifications_enabled' ;
10- static const String _notificationDaysKey = 'notification_days' ;
11- static const _notificationTimeKey = 'notification_time' ;
12- static const String _periodOverdueNotificationsEnabledKey = 'period_overdue_notifications_enabled' ;
13- static const String _periodOverdueNotificationDaysKey = 'period_overdue_notification_days' ;
14- static const _periodOverdueNotificationTimeKey = 'period_overdue_notification_time' ;
15- static const _biometricEnabledKey = 'biometric_enabled' ;
16- static const _historyViewKey = 'history_view' ;
17- static const _dynamicColorKey = 'dynamic_color' ;
18- static const _themeColorKey = 'theme_color' ;
19- static const _themeModeKey = 'theme_mode' ;
20- static const _persistentReminderKey = "always_show_reminder_button" ;
219
2210 Future <void > deleteAllSettings () async {
2311 final SharedPreferences prefs = await SharedPreferences .getInstance ();
@@ -135,7 +123,7 @@ class SettingsService {
135123
136124 Future <PeriodHistoryView > getHistoryView () async {
137125 final prefs = await SharedPreferences .getInstance ();
138- final viewName = prefs.getString (_historyViewKey );
126+ final viewName = prefs.getString (historyViewKey );
139127 return PeriodHistoryView .values.firstWhere (
140128 (e) => e.name == viewName,
141129 orElse: () => PeriodHistoryView .journal,
@@ -174,7 +162,7 @@ class SettingsService {
174162
175163 Future <Set <String >> getDefaultSymptoms () async {
176164 final prefs = await SharedPreferences .getInstance ();
177- final storedDefaultSymptoms = prefs.getStringList (_defaultSymptomsKey );
165+ final storedDefaultSymptoms = prefs.getStringList (defaultSymptomsKey );
178166
179167 if (storedDefaultSymptoms == null || storedDefaultSymptoms.isEmpty) {
180168 return {"Headache" , "Fatigue" , "Cramps" , "Nausea" , "Mood Swings" , "Bloating" , "Acne" , "Back pain" };
@@ -185,7 +173,7 @@ class SettingsService {
185173
186174 Future <void > setDefaultSymptoms (Set <String > symptoms) async {
187175 final prefs = await SharedPreferences .getInstance ();
188- prefs.setStringList (_defaultSymptomsKey , symptoms.toList ());
176+ prefs.setStringList (defaultSymptomsKey , symptoms.toList ());
189177 }
190178
191179 Future <void > addDefaultSymptom (String symptom) async {
0 commit comments