Notification class
This Notifications API interface is used to configure and display desktop notifications to the user.
- Implemented types
- Available extensions
- Annotations
-
- @JS()
- @staticInterop
Constructors
- Notification(String title, [NotificationOptions? options])
-
factory
Properties
- addEventListener ↔ void Function(String, [Object?, Object?])
-
Available on EventTarget, provided by the EventTarget$Typings extension
getter/setter pair -
addEventListener
→ ({void Function<
K$>(NotificationEventMap< $1, void Function(String type, Object listener, [Object? options]) $2})K$> type, dynamic listener(K$), [Object? options]) -
Available on Notification, provided by the Notification$Typings extension
Overload accessor: $1, $2no setter - body → String
-
Available on Notification, provided by the Notification$Typings extension
MDN Referenceno setter - close ↔ void Function()
-
Available on Notification, provided by the Notification$Typings extension
getter/setter pair - data → dynamic
-
Available on Notification, provided by the Notification$Typings extension
MDN Referenceno setter - dir → NotificationDirection
-
Available on Notification, provided by the Notification$Typings extension
MDN Referenceno setter - dispatchEvent ↔ bool Function(Event)
-
Available on EventTarget, provided by the EventTarget$Typings extension
getter/setter pair - hashCode → int
-
The hash code for this object.
no setterinherited
- icon → String
-
Available on Notification, provided by the Notification$Typings extension
MDN Referenceno setter - lang → String
-
Available on Notification, provided by the Notification$Typings extension
MDN Referenceno setter - onclick ↔ dynamic Function(Event)?
-
Available on Notification, provided by the Notification$Typings extension
MDN Referencegetter/setter pair - onclose ↔ dynamic Function(Event)?
-
Available on Notification, provided by the Notification$Typings extension
MDN Referencegetter/setter pair - onerror ↔ dynamic Function(Event)?
-
Available on Notification, provided by the Notification$Typings extension
MDN Referencegetter/setter pair - onshow ↔ dynamic Function(Event)?
-
Available on Notification, provided by the Notification$Typings extension
MDN Referencegetter/setter pair - removeEventListener ↔ void Function(String, [Object?, Object?])
-
Available on EventTarget, provided by the EventTarget$Typings extension
getter/setter pair -
removeEventListener
→ ({void Function<
K$>(NotificationEventMap< $1, void Function(String type, Object listener, [Object? options]) $2})K$> type, dynamic listener(K$), [Object? options]) -
Available on Notification, provided by the Notification$Typings extension
Overload accessor: $1, $2no setter - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- silent → bool?
-
Available on Notification, provided by the Notification$Typings extension
MDN Referenceno setter - tag → String
-
Available on Notification, provided by the Notification$Typings extension
MDN Referenceno setter - title → String
-
Available on Notification, provided by the Notification$Typings extension
MDN Referenceno setter
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Properties
- permission → NotificationPermission
-
MDN Reference
no setter
-
requestPermission
↔ Future<
NotificationPermission> Function([NotificationPermissionCallback?]) -
getter/setter pair