ApnsMpnBuilder class
Utility class that provides methods to build or parse the JSON structure used to represent the format of a push notification.
It provides properties and methods to get and set the fields of a push notification, following the format specified by Apple's Push Notification service (APNs). This format is compatible with MpnSubscription.setNotificationFormat.
Constructors
- ApnsMpnBuilder()
- Creates an empty object to be used to create a push notification format from scratch.
- ApnsMpnBuilder.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.
-
getAlert(
) → String? -
Value of the
aps.alertfield. -
getBadge(
) → String? -
Value of the
aps.badgefield as a string value. -
getBody(
) → String? -
Value of the
aps.alert.bodyfield. -
getBodyLocArguments(
) → List< String> ? -
Value of the
aps.alert.loc-argsfield as an array of strings. -
getBodyLocKey(
) → String? -
Value of the
aps.alert.loc-keyfield. -
getCategory(
) → String? -
Value of the
aps.categoryfield. -
getContentAvailable(
) → String? -
Value of the
aps.content-availablefield as a string value. -
getCustomData(
) → Map< String, dynamic> ? -
Fields in the root of the notification format (excluding
aps). -
getLaunchImage(
) → String? -
Value of the
aps.alert.launch-imagefield. -
getLocActionKey(
) → String? -
Value of the
aps.alert.action-loc-keyfield. -
getMutableContent(
) → String? -
Value of the
aps.mutable-contentfield as a string value. -
getSound(
) → String? -
Value of the
aps.soundfield. -
getSubtitle(
) → String? -
Value of the
aps.alert.subtitlefield. -
getThreadId(
) → String? -
Value of the
aps.thread-idfield. -
getTitle(
) → String? -
Value of the
aps.alert.titlefield. -
getTitleLocArguments(
) → List< String> ? -
Value of the
aps.alert.title-loc-argsfield. -
getTitleLocKey(
) → String? -
Value of the
aps.alert.title-loc-keyfield. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
setAlert(
String? val) → ApnsMpnBuilder -
Sets the
aps.alertfield. -
setBadge(
String? val) → ApnsMpnBuilder -
Sets the
aps.badgefield with a string value. -
setBody(
String? val) → ApnsMpnBuilder -
Sets the
aps.alert.bodyfield. -
setBodyLocArguments(
List< String> ? val) → ApnsMpnBuilder -
Sets the
aps.alert.loc-argsfield. -
setBodyLocKey(
String? val) → ApnsMpnBuilder -
Sets the
aps.alert.loc-keyfield. -
setCategory(
String? val) → ApnsMpnBuilder -
Sets the
aps.categoryfield. -
setContentAvailable(
String? val) → ApnsMpnBuilder -
Sets the
aps.content-availablefield with a string value. -
setCustomData(
Map< String, dynamic> ? val) → ApnsMpnBuilder -
Sets fields in the root of the notification format (excluding
aps). -
setLaunchImage(
String? val) → ApnsMpnBuilder -
Sets the
aps.alert.launch-imagefield. -
setLocActionKey(
String? val) → ApnsMpnBuilder -
Sets the
aps.alert.action-loc-keyfield. -
setMutableContent(
String? val) → ApnsMpnBuilder -
Sets the
aps.mutable-contentfield with a string value. -
setSound(
String? val) → ApnsMpnBuilder -
Sets the
aps.soundfield. -
setSubtitle(
String? val) → ApnsMpnBuilder -
Sets the
aps.alert.subtitlefield. -
setThreadId(
String? val) → ApnsMpnBuilder -
Sets the
aps.thread-idfield. -
setTitle(
String? val) → ApnsMpnBuilder -
Sets the
aps.alert.titlefield. -
setTitleLocArguments(
List< String> ? val) → ApnsMpnBuilder -
Sets the
aps.alert.title-loc-argsfield. -
setTitleLocKey(
String? val) → ApnsMpnBuilder -
Sets the
aps.alert.title-loc-keyfield. -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited