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
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.
-
checkIfSerializable(
Map< String, dynamic> params) → void -
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, Map< String, dynamic> params = const {}}) → Future<bool> -
Schedules a one-shot timer to run
callback
after timedelay
. -
oneShotAt(
DateTime time, int id, Function callback, {bool alarmClock = false, bool allowWhileIdle = false, bool exact = false, bool wakeup = false, bool rescheduleOnReboot = false, Map< String, dynamic> params = const {}}) → Future<bool> -
Schedules a one-shot timer to run
callback
attime
. -
periodic(
Duration duration, int id, Function callback, {DateTime? startAt, bool allowWhileIdle = false, bool exact = false, bool wakeup = false, bool rescheduleOnReboot = false, Map< String, dynamic> params = const {}}) → Future<bool> -
Schedules a repeating timer to run
callback
with periodduration
. -
setTestOverrides(
{Now? now, GetCallbackHandle? getCallbackHandle}) → void - This is exposed for the unit tests. It should not be accessed by users of the plugin.
Constants
- channel → const MethodChannel
- channelName → const String