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.alert
field. -
getBadge(
) → String? -
Value of the
aps.badge
field as a string value. -
getBody(
) → String? -
Value of the
aps.alert.body
field. -
getBodyLocArguments(
) → List< String> ? -
Value of the
aps.alert.loc-args
field as an array of strings. -
getBodyLocKey(
) → String? -
Value of the
aps.alert.loc-key
field. -
getCategory(
) → String? -
Value of the
aps.category
field. -
getContentAvailable(
) → String? -
Value of the
aps.content-available
field 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-image
field. -
getLocActionKey(
) → String? -
Value of the
aps.alert.action-loc-key
field. -
getMutableContent(
) → String? -
Value of the
aps.mutable-content
field as a string value. -
getSound(
) → String? -
Value of the
aps.sound
field. -
getSubtitle(
) → String? -
Value of the
aps.alert.subtitle
field. -
getThreadId(
) → String? -
Value of the
aps.thread-id
field. -
getTitle(
) → String? -
Value of the
aps.alert.title
field. -
getTitleLocArguments(
) → List< String> ? -
Value of the
aps.alert.title-loc-args
field. -
getTitleLocKey(
) → String? -
Value of the
aps.alert.title-loc-key
field. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
setAlert(
String? val) → ApnsMpnBuilder -
Sets the
aps.alert
field. -
setBadge(
String? val) → ApnsMpnBuilder -
Sets the
aps.badge
field with a string value. -
setBody(
String? val) → ApnsMpnBuilder -
Sets the
aps.alert.body
field. -
setBodyLocArguments(
List< String> ? val) → ApnsMpnBuilder -
Sets the
aps.alert.loc-args
field. -
setBodyLocKey(
String? val) → ApnsMpnBuilder -
Sets the
aps.alert.loc-key
field. -
setCategory(
String? val) → ApnsMpnBuilder -
Sets the
aps.category
field. -
setContentAvailable(
String? val) → ApnsMpnBuilder -
Sets the
aps.content-available
field 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-image
field. -
setLocActionKey(
String? val) → ApnsMpnBuilder -
Sets the
aps.alert.action-loc-key
field. -
setMutableContent(
String? val) → ApnsMpnBuilder -
Sets the
aps.mutable-content
field with a string value. -
setSound(
String? val) → ApnsMpnBuilder -
Sets the
aps.sound
field. -
setSubtitle(
String? val) → ApnsMpnBuilder -
Sets the
aps.alert.subtitle
field. -
setThreadId(
String? val) → ApnsMpnBuilder -
Sets the
aps.thread-id
field. -
setTitle(
String? val) → ApnsMpnBuilder -
Sets the
aps.alert.title
field. -
setTitleLocArguments(
List< String> ? val) → ApnsMpnBuilder -
Sets the
aps.alert.title-loc-args
field. -
setTitleLocKey(
String? val) → ApnsMpnBuilder -
Sets the
aps.alert.title-loc-key
field. -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited