Notification class

Inheritance
Annotations
  • @DomName('Notification')
  • @Experimental()
  • @Native("Notification")

Constructors

Notification(String title, { String dir: null, String body: null, String lang: null, String tag: null, String icon: null })
factory

Properties

actions List
@DocsEditable(), @DomName('Notification.actions'), @Experimental(), final
badge String
@DocsEditable(), @DomName('Notification.badge'), @Experimental(), final
body String
@DocsEditable(), @DomName('Notification.body'), @Experimental(), final
data Object
@annotation_Creates_SerializedScriptValue, @annotation_Returns_SerializedScriptValue, @DocsEditable(), @DomName('Notification.data'), @Experimental(), final
dir String
@DocsEditable(), @DomName('Notification.dir'), @Experimental(), final
icon String
@DocsEditable(), @DomName('Notification.icon'), @Experimental(), final
image String
@DocsEditable(), @DomName('Notification.image'), @Experimental(), final
lang String
@DocsEditable(), @DomName('Notification.lang'), @Experimental(), final
maxActions int
@DocsEditable(), @DomName('Notification.maxActions'), @Experimental(), final
onClick Stream<Event>
Stream of click events handled by this Notification.
@DocsEditable(), @DomName('Notification.onclick'), read-only
onClose Stream<Event>
Stream of close events handled by this Notification.
@DocsEditable(), @DomName('Notification.onclose'), read-only
onError Stream<Event>
Stream of error events handled by this Notification.
@DocsEditable(), @DomName('Notification.onerror'), read-only
onShow Stream<Event>
Stream of show events handled by this Notification.
@DocsEditable(), @DomName('Notification.onshow'), read-only
permission String
@DocsEditable(), @DomName('Notification.permission'), final
renotify bool
@DocsEditable(), @DomName('Notification.renotify'), @Experimental(), final
requireInteraction bool
@DocsEditable(), @DomName('Notification.requireInteraction'), @Experimental(), final
silent bool
@DocsEditable(), @DomName('Notification.silent'), @Experimental(), final
tag String
@DocsEditable(), @DomName('Notification.tag'), @Experimental(), final
timestamp int
@DocsEditable(), @DomName('Notification.timestamp'), @Experimental(), final
title String
@DocsEditable(), @DomName('Notification.title'), @Experimental(), final
vibrate List<int>
@DocsEditable(), @DomName('Notification.vibrate'), @Experimental(), final
hashCode int
The hash code for this object. [...]
read-only, inherited
on Events
This is an ease-of-use accessor for event streams which should only be used when an explicit accessor is not available.
read-only, inherited
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited

Methods

close() → void
@DocsEditable(), @DomName('Notification.close')
addEventListener(String type, EventListener listener, [ bool useCapture ]) → void
inherited
dispatchEvent(Event event) bool
@DocsEditable(), @DomName('EventTarget.dispatchEvent'), inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
removeEventListener(String type, EventListener listener, [ bool useCapture ]) → void
inherited
toString() String
Returns a string representation of this object.
inherited

Operators

operator ==(dynamic other) bool
The equality operator. [...]
inherited

Static Properties

supported bool
Checks if this type is supported on the current platform.
read-only

Static Methods

requestPermission() Future<String>
@DocsEditable(), @DomName('Notification.requestPermission'), @JSName('requestPermission')

Constants

clickEvent → const EventStreamProvider<Event>
Static factory designed to expose click events to event handlers that are not necessarily instances of Notification. [...]
@DocsEditable(), @DomName('Notification.clickEvent')
const EventStreamProvider<Event>('click')
closeEvent → const EventStreamProvider<Event>
Static factory designed to expose close events to event handlers that are not necessarily instances of Notification. [...]
@DocsEditable(), @DomName('Notification.closeEvent')
const EventStreamProvider<Event>('close')
errorEvent → const EventStreamProvider<Event>
Static factory designed to expose error events to event handlers that are not necessarily instances of Notification. [...]
@DocsEditable(), @DomName('Notification.errorEvent')
const EventStreamProvider<Event>('error')
showEvent → const EventStreamProvider<Event>
Static factory designed to expose show events to event handlers that are not necessarily instances of Notification. [...]
@DocsEditable(), @DomName('Notification.showEvent')
const EventStreamProvider<Event>('show')