AppNotification class

Clase que representa las preferencias de notificaciones del usuario en la aplicación.

Esta clase tiene la configuración individual de cada tipo de notificación que puede recibir el usuario, permitiendo activar o desactivar cada una según sus necesidades. Además, permite guardar y recuperar estas preferencias desde almacenamiento local.

Incluye opciones como:

  • Activación global de notificaciones.
  • Notificaciones diarias.
  • Motivación semanal.
  • Avisos por nuevos récords.
  • Recordatorios de entrenamiento.
  • Alertas por inactividad.

Constructors

AppNotification({bool isActive = true, bool dailyNotifications = true, bool weeklyMotivation = false, bool newRecordNotification = true, bool trainingReminders = false, bool inactivityNotification = true})
Constructor de la clase AppNotification.

Properties

dailyNotifications bool
Indica si las notificaciones diarias están activadas.
final
hashCode int
The hash code for this object.
no setterinherited
inactivityNotification bool
Indica si las notificaciones por inactividad están activadas.
final
isActive bool
Indica si las notificaciones están activadas en general.
final
newRecordNotification bool
Indica si las notificaciones por nuevos récords están activadas.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
trainingReminders bool
Indica si los recordatorios de entrenamiento están activados.
final
weeklyMotivation bool
Indica si las notificaciones de motivación semanal están activadas.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
saveToPreferences(SharedPreferences prefs) Future<void>
Guarda las preferencias de notificación en SharedPreferences.
scheduleAllNotifications(BuildContext context) Future<void>
Método para todas las notificaciones configuradas por el usuario.
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Properties

preferences SharedPreferences
getter/setter pair

Static Methods

startPreferences() Future<void>
Inicializa las preferencias compartidas para guardar y cargar la notificaciones.