pushMessageFromJsonDictionary static method
Creates and initializes a push message object from a JSON object. @param jsonDictionary The dictionary from the JSON. @returns The push message created.
Implementation
static MBPushMessage pushMessageFromJsonDictionary(
Map<String, dynamic> jsonDictionary) {
String id = jsonDictionary['id'];
String title = jsonDictionary['title'];
String body = jsonDictionary['body'];
bool sent = jsonDictionary['sent'];
int? badge = jsonDictionary['badge'];
String? sound = jsonDictionary['sound'];
String? launchImage = jsonDictionary['launchImage'];
Map<String, dynamic>? userInfo = jsonDictionary['userInfo'];
return MBPushMessage(
id: id,
title: title,
body: body,
sent: sent,
badge: badge,
sound: sound,
launchImage: launchImage,
userInfo: userInfo,
);
}