FirebaseMpnBuilder class

Utility class that provides methods to build or parse the JSON structure used to represent the format of a push notification.

It provides getters and setters for the fields of a push notification, following the format specified by FCM REST API. This format is compatible with MpnSubscription.setNotificationFormat.

  • See MpnSubscription.setNotificationFormat
Available extensions

Constructors

FirebaseMpnBuilder([String? notificationFormat])
Creates an object to be used to create a push notification format.
factory

Properties

hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

build() → String

Available on FirebaseMpnBuilder, provided by the FirebaseMpnBuilderExt extension

Produces the JSON structure for the push notification format specified by this object.
getBody() → String?

Available on FirebaseMpnBuilder, provided by the FirebaseMpnBuilderExt extension

Gets the value of webpush.notification.body field.
getData() → Map<String, String>?

Available on FirebaseMpnBuilder, provided by the FirebaseMpnBuilderExt extension

Gets sub-fields of the webpush.data field.
getHeaders() → Map<String, String>?

Available on FirebaseMpnBuilder, provided by the FirebaseMpnBuilderExt extension

Gets sub-fields of the webpush.headers field.
getIcon() → String?

Available on FirebaseMpnBuilder, provided by the FirebaseMpnBuilderExt extension

Gets the value of webpush.notification.icon field.
getTitle() → String?

Available on FirebaseMpnBuilder, provided by the FirebaseMpnBuilderExt extension

Gets the value of webpush.notification.title field.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
setBody(String? body) → FirebaseMpnBuilder

Available on FirebaseMpnBuilder, provided by the FirebaseMpnBuilderExt extension

Sets the webpush.notification.body field.
setData(Map<String, String>? data) → FirebaseMpnBuilder

Available on FirebaseMpnBuilder, provided by the FirebaseMpnBuilderExt extension

Sets sub-fields of the webpush.data field.
setHeaders(Map<String, String>? headers) → FirebaseMpnBuilder

Available on FirebaseMpnBuilder, provided by the FirebaseMpnBuilderExt extension

Sets sub-fields of the webpush.headers field.
setIcon(String? icon) → FirebaseMpnBuilder

Available on FirebaseMpnBuilder, provided by the FirebaseMpnBuilderExt extension

Sets the webpush.notification.icon field.
setTitle(String? title) → FirebaseMpnBuilder

Available on FirebaseMpnBuilder, provided by the FirebaseMpnBuilderExt extension

Sets the webpush.notification.title field.
toString() → String
A string representation of this object.
inherited

Operators

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