ChromeNotifications class
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.
|Returns|: Returns a Promise which resolves 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.
|Returns|: Returns a Promise which resolves with the set of
notification_ids currently in the system.
-
getPermissionLevel()
→ Future<PermissionLevel>
-
Retrieves whether the user has enabled notifications from this app
or extension.
|Returns|: Returns a Promise which resolves with 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.
|Returns|: Returns a Promise which resolves to indicate whether a
matching notification existed.