turnOffValue method
Método que desactiva todas las notificaciones.
Guarda los valores en SharedPreferences
y notifica a los listeners.
Implementation
void turnOffValue() async {
final prefs = AppNotification.preferences;
notification = AppNotification(
isActive: false,
dailyNotifications: false,
weeklyMotivation: false,
newRecordNotification: false,
trainingReminders: false,
inactivityNotification: false,
);
await notification.saveToPreferences(prefs);
notifyListeners();
}