Notification class

This Notifications API interface is used to configure and display desktop notifications to the user.

MDN Reference

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<K$> type, dynamic listener(K$), [Object? options]) $1, void Function(String type, Object listener, [Object? options]) $2})

Available on Notification, provided by the Notification$Typings extension

Overload accessor: $1, $2
no setter
body String

Available on Notification, provided by the Notification$Typings extension

MDN Reference
no 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 Reference
no setter
dir NotificationDirection

Available on Notification, provided by the Notification$Typings extension

MDN Reference
no 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 Reference
no setter
lang String

Available on Notification, provided by the Notification$Typings extension

MDN Reference
no setter
onclick ↔ dynamic Function(Event)?

Available on Notification, provided by the Notification$Typings extension

MDN Reference
getter/setter pair
onclose ↔ dynamic Function(Event)?

Available on Notification, provided by the Notification$Typings extension

MDN Reference
getter/setter pair
onerror ↔ dynamic Function(Event)?

Available on Notification, provided by the Notification$Typings extension

MDN Reference
getter/setter pair
onshow ↔ dynamic Function(Event)?

Available on Notification, provided by the Notification$Typings extension

MDN Reference
getter/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<K$> type, dynamic listener(K$), [Object? options]) $1, void Function(String type, Object listener, [Object? options]) $2})

Available on Notification, provided by the Notification$Typings extension

Overload accessor: $1, $2
no 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 Reference
no setter
tag String

Available on Notification, provided by the Notification$Typings extension

MDN Reference
no setter
title String

Available on Notification, provided by the Notification$Typings extension

MDN Reference
no 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