startPreferences static method
Inicializa las preferencias compartidas para guardar y cargar la notificaciones.
Implementation
static Future<void> startPreferences() async {
preferences = await SharedPreferences.getInstance();
if (preferences.getKeys().isEmpty) {
await preferences.setBool("isActive", true);
await preferences.setBool("dailyNotifications", false);
await preferences.setBool("newRecordNotification", true);
await preferences.setBool("trainingReminders", false);
await preferences.setBool("inactivityNotification", true);
}
}