NotificationPermission class

Permission state for the Notification API.

Use the predefined constants (defaultValue, denied, granted) or construct with a raw string for forward-compatibility.

See: https://developer.mozilla.org/en-US/docs/Web/API/Notification/permission_static

Constructors

NotificationPermission(String value)
Creates a permission from a raw string value.
const

Properties

hashCode int
The hash code for this object.
no setteroverride
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
value String
The underlying string value (e.g. 'default', 'denied', 'granted').
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.
override

Constants

defaultValue → const NotificationPermission
User choice is unknown; behaves as denied.
denied → const NotificationPermission
User explicitly denied notifications.
granted → const NotificationPermission
User explicitly granted notifications.