Notification class

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

Constants

clickEventEventStreamProvider<Event>
@DocsEditable(), @DomName('Notification.clickEvent')

Static factory designed to expose click events to event handlers that are not necessarily instances of Notification.

const EventStreamProvider<Event>('click')
closeEventEventStreamProvider<Event>
@DocsEditable(), @DomName('Notification.closeEvent')

Static factory designed to expose close events to event handlers that are not necessarily instances of Notification.

const EventStreamProvider<Event>('close')
errorEventEventStreamProvider<Event>
@DocsEditable(), @DomName('Notification.errorEvent')

Static factory designed to expose error events to event handlers that are not necessarily instances of Notification.

const EventStreamProvider<Event>('error')
showEventEventStreamProvider<Event>
@DocsEditable(), @DomName('Notification.showEvent')

Static factory designed to expose show events to event handlers that are not necessarily instances of Notification.

const EventStreamProvider<Event>('show')

Static Properties

instanceRuntimeTypeType
@Deprecated("Internal Use Only"), read-only
supportedbool
read-only

Checks if this type is supported on the current platform.

Static Methods

requestPermission() → Future<String>

Constructors

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

Properties

actionsList
@DocsEditable(), @DomName('Notification.actions'), @Experimental(), read-only
bodyString
@DocsEditable(), @DomName('Notification.body'), @Experimental(), read-only
dataObject
@DocsEditable(), @DomName('Notification.data'), @Experimental(), read-only
dirString
@DocsEditable(), @DomName('Notification.dir'), @Experimental(), read-only
iconString
@DocsEditable(), @DomName('Notification.icon'), @Experimental(), read-only
langString
@DocsEditable(), @DomName('Notification.lang'), @Experimental(), read-only
maxActionsint
@DocsEditable(), @DomName('Notification.maxActions'), @Experimental(), read-only
onClickStream<Event>
@DocsEditable(), @DomName('Notification.onclick'), read-only

Stream of click events handled by this Notification.

onCloseStream<Event>
@DocsEditable(), @DomName('Notification.onclose'), read-only

Stream of close events handled by this Notification.

onErrorStream<Event>
@DocsEditable(), @DomName('Notification.onerror'), read-only

Stream of error events handled by this Notification.

onShowStream<Event>
@DocsEditable(), @DomName('Notification.onshow'), read-only

Stream of show events handled by this Notification.

permissionString
@DocsEditable(), @DomName('Notification.permission'), read-only
renotifybool
@DocsEditable(), @DomName('Notification.renotify'), @Experimental(), read-only
requireInteractionbool
@DocsEditable(), @DomName('Notification.requireInteraction'), @Experimental(), read-only
silentbool
@DocsEditable(), @DomName('Notification.silent'), @Experimental(), read-only
tagString
@DocsEditable(), @DomName('Notification.tag'), @Experimental(), read-only
timestampint
@DocsEditable(), @DomName('Notification.timestamp'), @Experimental(), read-only
titleString
@DocsEditable(), @DomName('Notification.title'), @Experimental(), read-only
vibrateList<int>
@DocsEditable(), @DomName('Notification.vibrate'), @Experimental(), read-only
hashCodeint
read-only, inherited
onEvents
read-only, inherited

This is an ease-of-use accessor for event streams which should only be used when an explicit accessor is not available.

runtimeTypeType
read-only, inherited

A representation of the runtime type of the object.

Operators

operator ==(other) → bool
inherited

The equality operator.

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
inherited

Invoked when a non-existent method or property is accessed.

removeEventListener(String type, EventListener listener, [ bool useCapture ]) → void
inherited
toString() → String
inherited

Returns the result of the JavaScript objects toString method.

© 2012 the Dart project authors
Licensed under the Creative Commons Attribution-ShareAlike License v4.0.
https://api.dartlang.org/stable/1.24.3/dart-html/Notification-class.html