MethodChannelAlarmPlus class

An implementation of AlarmPlusPlatform that uses method channels.

Communicates with native platform code (Android Kotlin, iOS Swift) via:

  • MethodChannel (alarm_plus): Bidirectional method calls
  • EventChannel (alarm_plus/events): Native → Dart event streaming
Inheritance

Constructors

MethodChannelAlarmPlus()

Properties

events → Stream<AlarmEvent>
A broadcast stream of alarm state change events.
no setteroverride
hashCode → int
The hash code for this object.
no setterinherited
methodChannel → MethodChannel
The method channel used to interact with the native platform.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

cancel(String id) → Future<void>
Pauses (cancels) an alarm, transitioning it to "scheduled" status.
override
delete(String id) → Future<void>
Permanently removes an alarm from persistent storage.
override
getAll() → Future<List<AlarmModel>>
Retrieves all scheduled alarms.
override
getLaunchAlarm() → Future<AlarmModel?>
Retrieves the alarm that triggered app launch, if any.
override
getPermissionStatus() → Future<AlarmPermissionStatus>
Queries current alarm-related permissions.
override
initialize({DidReceiveNotificationResponseCallback? onDidReceiveNotificationResponse, DidReceiveBackgroundNotificationResponseCallback? onDidReceiveBackgroundNotificationResponse}) → Future<void>
Initializes the platform-specific alarm implementation.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
requestPermissions() → Future<AlarmPermissionStatus>
Requests necessary permissions from the user.
override
schedule({required String id, required DateTime time, Map<String, dynamic>? data, AlarmNotificationSettings? notificationSettings}) → Future<void>
Schedules a persistent alarm to fire at the given time.
override
snooze({required String id, required int minutes}) → Future<void>
Reschedules an alarm to fire after the specified number of minutes.
override
stop() → Future<void>
Stops the currently ringing alarm.
override
toString() → String
A string representation of this object.
inherited
triggerNow({required Map<String, dynamic> data, AlarmNotificationSettings? notificationSettings}) → Future<void>
Triggers an alarm immediately without persistent scheduling.
override

Operators

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