Notification class abstract

A system notification displayed to the user.

Create instances via the createNotification factory function. Use notificationPermission to check and requestNotificationPermission to request the current permission state.

See: https://developer.mozilla.org/en-US/docs/Web/API/Notification

Implemented types

Constructors

Notification()

Properties

actions → List<NotificationAction>
The list of actions available on this notification.
no setter
badge → String
The URL of the notification badge.
no setter
body → String
The body text of the notification.
no setter
data → Object?
Arbitrary data associated with the notification.
no setter
dir → NotificationDirection
The text direction of the notification.
no setter
hashCode → int
The hash code for this object.
no setterinherited
icon → String
The URL of the notification icon.
no setter
image → String
The URL of the notification image.
no setter
lang → String
The language of the notification.
no setter
raw → dynamic
The underlying platform object.
no setterinherited
renotify → bool
Whether the user is re-notified when an existing notification is replaced by a new one with the same tag.
no setter
requireInteraction → bool
Whether the notification stays active until the user clicks or dismisses it.
no setter
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
silent → bool?
Whether the notification is silent.
no setter
tag → String
The ID tag of the notification.
no setter
timestamp → int?
The timestamp associated with the notification (milliseconds since epoch).
no setter
title → String
The title of the notification.
no setter
vibrate → List<int>?
The vibration pattern for the device.
no setter

Methods

addEventListener(String type, EventListener? callback) → void
Registers an event listener on this target.
inherited
close() → void
Programmatically closes the notification.
dispatchEvent(Event event) → bool
Dispatches an event to this target.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
removeEventListener(String type, EventListener? callback) → void
Removes a previously registered event listener.
inherited
toString() → String
A string representation of this object.
inherited

Operators

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