Alarm class

Class that handles the alarm.

Constructors

Alarm()

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 Properties

android bool
Whether it's Android device.
no setter
iOS bool
Whether it's iOS device.
no setter
ringStream StreamController<AlarmSettings>
Stream of the ringing status.
final

Static Methods

alarmSettingsValidation(AlarmSettings alarmSettings) → void
Validates alarmSettings fields.
checkAlarm() Future<void>
Checks if some alarms were set on previous session. If it's the case then reschedules them.
getAlarm(int id) AlarmSettings?
Returns alarm by given id. Returns null if not found.
getAlarms() List<AlarmSettings>
Returns all the alarms.
hasAlarm() bool
Whether an alarm is set.
init({bool showDebugLogs = true}) Future<void>
Initializes Alarm services.
isRinging(int id) Future<bool>
Whether the alarm is ringing.
set({required AlarmSettings alarmSettings}) Future<bool>
Schedules an alarm with given alarmSettings with its notification.
setNotificationOnAppKillContent(String title, String body) Future<void>
When the app is killed, all the processes are terminated so the alarm may never ring. By default, to warn the user, a notification is shown at the moment he kills the app. This methods allows you to customize this notification content.
stop(int id) Future<bool>
Stops alarm.
stopAll() Future<void>
Stops all the alarms.