AlarmPermissionStatus class

Represents the current permission status for alarm operations.

Returned by AlarmPlus.getPermissionStatus and AlarmPlus.requestPermissions. Permissions differ significantly between Android and iOS.

Android Permissions:

  • notificationsGranted: POST_NOTIFICATIONS (Android 13+)
  • exactAlarmsGranted: SCHEDULE_EXACT_ALARM
  • fullScreenIntentGranted: USE_FULL_SCREEN_INTENT (Android 14+)
  • canOpenExactAlarmSettings: Can open system exact alarm settings
  • canOpenFullScreenSettings: Can open full-screen intent settings

iOS Permissions (platform-specific adaptations):

  • notificationsGranted: Whether notification authorization granted
  • exactAlarmsGranted: Always false (iOS has no exact alarm guarantee)
  • fullScreenIntentGranted: Always false (iOS has no full-screen intent)
  • criticalAlertsEligible: Whether app can use critical alerts

Example:

final status = await AlarmPlus.getPermissionStatus();
if (!status.notificationsGranted) {
  print('Notifications not authorized');
  await AlarmPlus.requestPermissions();
}
if (defaultTargetPlatform == TargetPlatform.android) {
  if (!status.exactAlarmsGranted) {
    print('Cannot schedule exact alarms');
  }
}

Constructors

AlarmPermissionStatus({required bool notificationsGranted, required bool exactAlarmsGranted, required bool fullScreenIntentGranted, required bool canOpenExactAlarmSettings, required bool canOpenFullScreenSettings, required bool criticalAlertsEligible, required Map<String, dynamic> platformMeta})
Creates a permission status instance.
const
AlarmPermissionStatus.fromMap(Map<String, dynamic> map)
Deserializes permission status from a map.
factory

Properties

canOpenExactAlarmSettings bool
Whether app can open system exact alarm settings page.
final
canOpenFullScreenSettings bool
Whether app can open system full-screen intent settings page.
final
criticalAlertsEligible bool
Whether app is eligible for critical alerts.
final
exactAlarmsGranted bool
Whether exact alarm scheduling permission is granted.
final
fullScreenIntentGranted bool
Whether full-screen intent permission is granted.
final
hashCode int
The hash code for this object.
no setterinherited
notificationsGranted bool
Whether notification permissions are granted.
final
platformMeta Map<String, dynamic>
Platform-specific metadata.
final
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
toMap() Map<String, dynamic>
Serializes permission status to a map.
toString() String
A string representation of this object.
inherited

Operators

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