Notification class

Note: This feature is available in Web Workers Secure context: This feature is available only in secure contexts (HTTPS), in some or all supporting browsers. The interface of the Notifications API is used to configure and display desktop notifications to the user. These notifications' appearance and specific functionality vary across platforms but generally they provide a way to asynchronously provide information to the user.

EventTarget

Notification

Implemented types
Available extensions
Annotations
  • @JS()
  • @staticInterop

Constructors

Notification(String title, [NotificationOptions? options])
factory

Properties

actions Iterable<NotificationAction>

Available on Notification, provided by the PropsNotification extension

no setter
badge String

Available on Notification, provided by the PropsNotification extension

no setter
body String

Available on Notification, provided by the PropsNotification extension

no setter
data → dynamic

Available on Notification, provided by the PropsNotification extension

no setter
dir NotificationDirection

Available on Notification, provided by the PropsNotification extension

no setter
hashCode int
The hash code for this object.
no setterinherited
icon String

Available on Notification, provided by the PropsNotification extension

no setter
image String

Available on Notification, provided by the PropsNotification extension

no setter
lang String

Available on Notification, provided by the PropsNotification extension

no setter
onclick EventHandlerNonNull<Event>?

Available on Notification, provided by the PropsNotification extension

getter/setter pair
onclose EventHandlerNonNull<Event>?

Available on Notification, provided by the PropsNotification extension

getter/setter pair
onerror EventHandlerNonNull<Event>?

Available on Notification, provided by the PropsNotification extension

getter/setter pair
onshow EventHandlerNonNull<Event>?

Available on Notification, provided by the PropsNotification extension

getter/setter pair
renotify bool

Available on Notification, provided by the PropsNotification extension

no setter
requireInteraction bool

Available on Notification, provided by the PropsNotification extension

no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
silent bool

Available on Notification, provided by the PropsNotification extension

no setter
tag String

Available on Notification, provided by the PropsNotification extension

no setter
timestamp int

Available on Notification, provided by the PropsNotification extension

no setter
title String

Available on Notification, provided by the PropsNotification extension

no setter
vibrate Iterable<int>

Available on Notification, provided by the PropsNotification extension

no setter

Methods

addEventListener(String type, EventListener? callback, [dynamic options]) → void

Available on EventTarget, provided by the PropsEventTarget extension

close() → void

Available on Notification, provided by the PropsNotification extension

dispatchEvent(Event event) bool

Available on EventTarget, provided by the PropsEventTarget extension

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
removeEventListener(String type, EventListener? callback, [dynamic options]) → void

Available on EventTarget, provided by the PropsEventTarget extension

toString() String
A string representation of this object.
inherited

Operators

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