ChromeNotifications class

Properties

hashCode int
The hash code for this object.
no setterinherited
isAvailable bool
no setter
onButtonClicked EventStream<OnButtonClickedEvent>
The user pressed a button in the notification.
no setter
onClicked EventStream<String>
The user clicked in a non-button area of the notification.
no setter
onClosed EventStream<OnClosedEvent>
The notification closed, either by the system or by user action.
no setter
onPermissionLevelChanged EventStream<PermissionLevel>
The user changes the permission level. As of Chrome 47, only ChromeOS has UI that dispatches this event.
no setter
onShowSettings EventStream<void>
The user clicked on a link for the app's notification settings. As of Chrome 47, only ChromeOS has UI that dispatches this event. As of Chrome 65, that UI has been removed from ChromeOS, too.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

clear(String notificationId) Future<bool>
Clears the specified notification. |notificationId|: The id of the notification to be cleared. This is returned by notifications.create method. |callback|: Called to indicate whether a matching notification existed.
create(String? notificationId, NotificationOptions options) Future<String>
Creates and displays a notification. |notificationId|: Identifier of the notification. If not set or empty, an ID will automatically be generated. If it matches an existing notification, this method first clears that notification before proceeding with the create operation. The identifier may not be longer than 500 characters.
getAll() Future<Map>
Retrieves all the notifications of this app or extension. |callback|: Returns the set of notification_ids currently in the system.
getPermissionLevel() Future<PermissionLevel>
Retrieves whether the user has enabled notifications from this app or extension. |callback|: Returns the current permission level.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited
update(String notificationId, NotificationOptions options) Future<bool>
Updates an existing notification. |notificationId|: The id of the notification to be updated. This is returned by notifications.create method. |options|: Contents of the notification to update to. |callback|: Called to indicate whether a matching notification existed.

Operators

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