UNotificationPermission class

Notification permission and what is allowed (alert, sound, badge…).

Annotations

Constructors

UNotificationPermission({required UNotificationPermissionStatus status, bool? alert, bool? sound, bool? badge, bool? critical, bool? timeSensitive, bool? exactAlarms, bool? fullScreen})
const
UNotificationPermission.fromMap(Map<Object?, Object?> m)
Reads it from the native map.
factory

Properties

alert → bool?
Banners allowed.
final
badge → bool?
Badges allowed.
final
critical → bool?
Critical alerts allowed (Apple).
final
exactAlarms → bool?
Android 12+: exact scheduling allowed (otherwise schedules may be a few minutes late).
final
fullScreen → bool?
Android 14+: full-screen alerts allowed.
final
hashCode → int
The hash code for this object.
no setterinherited
isGranted → bool
True when notifications can be shown.
no setter
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
sound → bool?
Sounds allowed.
final
status → UNotificationPermissionStatus
Permission state.
final
timeSensitive → bool?
Time-sensitive allowed (Apple).
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
override

Operators

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