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
- Annotations
-
- @JS()
- @staticInterop
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 ofwebpush.notification.body
field. -
getData(
) → Map< String, String> ? -
Available on FirebaseMpnBuilder, provided by the FirebaseMpnBuilderExt extension
Gets sub-fields of thewebpush.data
field. -
getHeaders(
) → Map< String, String> ? -
Available on FirebaseMpnBuilder, provided by the FirebaseMpnBuilderExt extension
Gets sub-fields of thewebpush.headers
field. -
getIcon(
) → String? -
Available on FirebaseMpnBuilder, provided by the FirebaseMpnBuilderExt extension
Gets the value ofwebpush.notification.icon
field. -
getTitle(
) → String? -
Available on FirebaseMpnBuilder, provided by the FirebaseMpnBuilderExt extension
Gets the value ofwebpush.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 thewebpush.notification.body
field. -
setData(
Map< String, String> ? data) → FirebaseMpnBuilder -
Available on FirebaseMpnBuilder, provided by the FirebaseMpnBuilderExt extension
Sets sub-fields of thewebpush.data
field. -
setHeaders(
Map< String, String> ? headers) → FirebaseMpnBuilder -
Available on FirebaseMpnBuilder, provided by the FirebaseMpnBuilderExt extension
Sets sub-fields of thewebpush.headers
field. -
setIcon(
String? icon) → FirebaseMpnBuilder -
Available on FirebaseMpnBuilder, provided by the FirebaseMpnBuilderExt extension
Sets thewebpush.notification.icon
field. -
setTitle(
String? title) → FirebaseMpnBuilder -
Available on FirebaseMpnBuilder, provided by the FirebaseMpnBuilderExt extension
Sets thewebpush.notification.title
field. -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited