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.

Constructors

FirebaseMpnBuilder()
Creates an empty object to be used to create a push notification format from scratch.
FirebaseMpnBuilder.from(String notificationFormat)
Creates an object based on the specified push notification format.

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() Future<String>
Produces the JSON structure for the push notification format specified by this object.
getBody() String?
Gets the value of android.notification.body field.
getBodyLocArguments() List<String>?
Gets the value of android.notification.body_loc_args field.
getBodyLocKey() String?
Gets the value of android.notification.body_loc_key field.
getClickAction() String?
Gets the value of android.notification.click_action field.
getCollapseKey() String?
Gets the value of android.collapse_key field.
getColor() String?
Gets the value of android.notification.color field.
getData() Map<String, String>?
Gets sub-fields of the android.data field.
getIcon() String?
Gets the value of android.notification.icon field.
getPriority() String?
Gets the value of android.priority field.
getSound() String?
Gets the value of android.notification.sound field.
getTag() String?
Gets the value of android.notification.tag field.
getTimeToLiveAsInteger() int?
Gets the value of android.ttl field as an integer.
getTimeToLiveAsString() String?
Gets the value of android.ttl field as a string.
getTitle() String?
Gets the value of android.notification.title field.
getTitleLocArguments() List<String>?
Gets the value of android.notification.title_loc_args field.
getTitleLocKey() String?
Gets the value of android.notification.title_loc_key field.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
setBody(String? body) FirebaseMpnBuilder
Sets the android.notification.body field.
setBodyLocArguments(List<String>? bodyLocArguments) FirebaseMpnBuilder
Sets the android.notification.body_loc_args field.
setBodyLocKey(String? bodyLocKey) FirebaseMpnBuilder
Sets the android.notification.body_loc_key field.
setClickAction(String? clickAction) FirebaseMpnBuilder
Sets the android.notification.click_action field.
setCollapseKey(String? collapseKey) FirebaseMpnBuilder
Sets the android.collapse_key field.
setColor(String? color) FirebaseMpnBuilder
Sets the android.notification.color field.
setData(Map<String, String>? data) FirebaseMpnBuilder
Sets sub-fields of the android.data field.
setIcon(String? icon) FirebaseMpnBuilder
Sets the android.notification.icon field.
setPriority(String? priority) FirebaseMpnBuilder
Sets the android.priority field.
setSound(String? sound) FirebaseMpnBuilder
Sets the android.notification.sound field.
setTag(String? tag) FirebaseMpnBuilder
Sets the android.notification.tag field.
setTimeToLive(String? timeToLive) FirebaseMpnBuilder
Sets the android.ttl field with a string value.
setTimeToLiveAsInteger(int? timeToLive) FirebaseMpnBuilder
Sets the android.ttl field with an integer value.
setTitle(String? title) FirebaseMpnBuilder
Sets the android.notification.title field.
setTitleLocArguments(List<String>? titleLocArguments) FirebaseMpnBuilder
Sets the android.notification.title_loc_args field.
setTitleLocKey(String? titleLocKey) FirebaseMpnBuilder
Sets the android.notification.title_loc_key field.
toString() String
A string representation of this object.
inherited

Operators

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