AndroidAlarmManager class

A Flutter plugin for registering Dart callbacks with the Android AlarmManager service.

See the example/ directory in this package for sample usage.

Constructors

AndroidAlarmManager()

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

cancel(int id) Future<bool>
Cancels a timer.
initialize() Future<bool>
Starts the AndroidAlarmManager service. This must be called before setting any alarms.
oneShot(Duration delay, int id, Function callback, {bool alarmClock = false, bool allowWhileIdle = false, bool exact = false, bool wakeup = false, bool rescheduleOnReboot = false}) Future<bool>
Schedules a one-shot timer to run callback after time delay.
oneShotAt(DateTime time, int id, Function callback, {bool alarmClock = false, bool allowWhileIdle = false, bool exact = false, bool wakeup = false, bool rescheduleOnReboot = false}) Future<bool>
Schedules a one-shot timer to run callback at time.
periodic(Duration duration, int id, Function callback, {DateTime? startAt, bool exact = false, bool wakeup = false, bool rescheduleOnReboot = false}) Future<bool>
Schedules a repeating timer to run callback with period duration.
setTestOverides({_Now? now, _GetCallbackHandle? getCallbackHandle}) → void
This is exposed for the unit tests. It should not be accessed by users of the plugin.