WebpushNotification class

Represents the WebPush-specific notification options that can be included in WebpushConfig. This supports most of the standard options as defined in the Web Notification specification.

Constructors

WebpushNotification({String? title, Map<String, Object?>? customData, List<WebpushNotificationAction>? actions, String? badge, String? body, Object? data, WebpushNotificationDirection? dir, String? icon, String? image, String? lang, bool? renotify, bool? requireInteraction, bool? silent, String? tag, int? timestamp, List<num>? vibrate})

Properties

actions → List<WebpushNotificationAction>?
A list of notification actions representing the actions available to the user when the notification is presented.
final
badge → String?
URL of the image used to represent the notification when there is not enough space to display the notification itself.
final
body → String?
Body text of the notification.
final
customData → Map<String, Object?>?
Arbitrary key/value payload.
final
data → Object?
Arbitrary data that you want associated with the notification. This can be of any data type.
final
dir → WebpushNotificationDirection?
The direction in which to display the notification. Must be one of auto, ltr or rtl.
final
hashCode → int
The hash code for this object.
no setterinherited
icon → String?
URL to the notification icon.
final
image → String?
URL of an image to be displayed in the notification.
final
lang → String?
The notification's language as a BCP 47 language tag.
final
renotify → bool?
A boolean specifying whether the user should be notified after a new notification replaces an old one. Defaults to false.
final
requireInteraction → bool?
Indicates that a notification should remain active until the user clicks or dismisses it, rather than closing automatically. Defaults to false.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
silent → bool?
A boolean specifying whether the notification should be silent. Defaults to false.
final
tag → String?
An identifying tag for the notification.
final
timestamp → int?
Timestamp of the notification. Refer to https://developer.mozilla.org/en-US/docs/Web/API/notification/timestamp for details.
final
title → String?
Title text of the notification.
final
vibrate → List<num>?
A vibration pattern for the device's vibration hardware to emit when the notification fires.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

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