ShowNotificationOptions class
Constructors
-
ShowNotificationOptions({List<ShowNotificationAction>? actions, String? badge, String? body, String? dir, String? icon, String? image, String? lang, bool? renotify, bool? requireInteraction, String? tag, List<int>? vibrate, dynamic data})
-
factory
Properties
-
actions
↔ List<ShowNotificationAction>
-
An array of actions to display in the notification. Appropriate responses
are built using event.action within the notificationclick event.
getter/setter pair
-
badge
↔ String
-
The URL of an image to represent the notification when there is not enough
space to display the notification itself such as, for example, the Android
Notification Bar. On Android devices, the badge should accommodate devices
up to 4x resolution, about 96 by 96 px, and the image will be
automatically masked.
getter/setter pair
-
body
↔ String
-
A string representing an extra content to display within the notification.
getter/setter pair
-
data
↔ dynamic
-
Arbitrary data that you want associated with the notification.
This can be of any data type.
getter/setter pair
-
dir
↔ String
-
The direction of the notification; it can be auto, ltr, or rtl
getter/setter pair
-
hashCode
→ int
-
The hash code for this object.
no setterinherited
-
icon
↔ String
-
The URL of an image to be used as an icon by the notification.
getter/setter pair
-
image
↔ String
-
A USVSTring containing the URL of an image to be displayed in the
notification.
getter/setter pair
-
lang
↔ String
-
Specify the lang used within the notification. This string must be a valid
BCP 47 language tag.
getter/setter pair
-
renotify
↔ bool
-
A boolean that indicates whether to supress vibrations and audible alerts
when resusing a tag value. The default is false.
getter/setter pair
-
requireInteraction
↔ bool
-
Indicates that on devices with sufficiently large screens, a notification
should remain active until the user clicks or dismisses it. If this value
is absent or false, the desktop version of Chrome will auto-minimize
notifications after approximately twenty seconds.
The default value is false.
getter/setter pair
-
runtimeType
→ Type
-
A representation of the runtime type of the object.
no setterinherited
-
tag
↔ String
-
An ID for a given notification that allows you to find, replace, or remove
the notification using script if necessary.
getter/setter pair
-
vibrate
↔ List<int>
-
A vibration pattern to run with the display of the notification.
A vibration pattern can be an array with as few as one member. The values
are times in milliseconds where the even indices (0, 2, 4, etc.) indicate
how long to vibrate and the odd indices indicate how long to pause. For
example
300, 100, 400
would vibrate 300ms, pause 100ms, then vibrate 400ms.
getter/setter pair
Methods
-
noSuchMethod(Invocation invocation)
→ dynamic
-
Invoked when a nonexistent method or property is accessed.
inherited
-
toString()
→ String
-
A string representation of this object.
inherited