AlarmPlusPlatform class abstract
Abstract interface for platform-specific alarm implementations.
This interface defines the contract that platform-specific implementations (Android, iOS) must fulfill. The Dart layer uses this interface to remain abstracted from platform details.
Platform implementations should extend this class and override all methods.
- Inheritance
-
- Object
- PlatformInterface
- AlarmPlusPlatform
- Implementers
Constructors
- AlarmPlusPlatform()
- Constructs a AlarmPlusPlatform.
Properties
-
events
→ Stream<
AlarmEvent> -
A broadcast stream of alarm state change events.
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- 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.
-
delete(
String id) → Future< void> - Permanently removes an alarm from persistent storage.
-
getAll(
) → Future< List< AlarmModel> > - Retrieves all scheduled alarms.
-
getLaunchAlarm(
) → Future< AlarmModel?> - Retrieves the alarm that triggered app launch, if any.
-
getPermissionStatus(
) → Future< AlarmPermissionStatus> - Queries current alarm-related permissions.
-
initialize(
{DidReceiveNotificationResponseCallback? onDidReceiveNotificationResponse, DidReceiveBackgroundNotificationResponseCallback? onDidReceiveBackgroundNotificationResponse}) → Future< void> - Initializes the platform-specific alarm implementation.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
requestPermissions(
) → Future< AlarmPermissionStatus> - Requests necessary permissions from the user.
-
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.
-
snooze(
{required String id, required int minutes}) → Future< void> - Reschedules an alarm to fire after the specified number of minutes.
-
stop(
) → Future< void> - Stops the currently ringing alarm.
-
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.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Properties
- instance ↔ AlarmPlusPlatform
-
The default instance of AlarmPlusPlatform to use.
getter/setter pair