Alarm class

A snapshot of an alarm known to the system, as returned by FlutterAlarmkit.getAlarms() and carried by alarm-update events.

Note that label and tintColor are persisted by the plugin (AlarmKit does not expose an alarm's presentation back to the app) and are only available for alarms scheduled through this plugin.

Annotations

Constructors

Alarm({required String id, required AlarmState state, AlarmSchedule? schedule, AlarmCountdownDuration? countdownDuration, String? label, String? tintColor, AlarmMetadata? metadata})
Creates an Alarm snapshot.
const
Alarm.fromMap(Map<String, dynamic> map)
Builds an Alarm from a platform-channel map.
factory

Properties

countdownDuration AlarmCountdownDuration?
The countdown timing, present only for countdown alarms.
final
hashCode int
The hash code for this object.
no setteroverride
id String
The alarm's unique identifier (a UUID string).
final
label String?
The title shown in the alarm presentation, if the plugin persisted one.
final
metadata AlarmMetadata?
Displayable metadata (icon + subtitle) attached at schedule time, if the plugin persisted any.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
schedule AlarmSchedule?
When the alarm fires, or null for a countdown timer (see countdownDuration).
final
state AlarmState
The current lifecycle state of the alarm.
final
tintColor String?
The alarm's tint color as a #RRGGBB hex string, if the plugin persisted one.
final

Methods

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

Operators

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