AlarmStorage class

Class that handles the local storage of the alarm info.

Constructors

AlarmStorage()

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

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

Static Methods

dispose() → void
Dispose the fgbg subscription to avoid memory leaks.
getSavedAlarms() Future<List<AlarmSettings>>
Returns all alarms info from local storage in the case app is terminated and we need to restore previously scheduled alarms.
hasAlarm() Future<bool>
Whether at least one alarm is set.
init() Future<void>
Initializes shared preferences instance.
saveAlarm(AlarmSettings alarmSettings) Future<void>
Saves alarm info in local storage so we can restore it later in the case app is terminated.
unsaveAlarm(int id) Future<void>
Removes alarm from local storage.
unsaveAll() Future<void>
Removes all alarms from local storage.

Constants

notificationOnAppKill → const String
Key to be used in local storage to identify notification on app kill title.
notificationOnAppKillBody → const String
Key to be used in local storage to identify notification on app kill body.
notificationOnAppKillTitle → const String
Key to be used in local storage to identify notification on app kill body.
prefix → const String
Prefix to be used in local storage to identify alarm info.