NUIPushNotification constructor
NUIPushNotification({})
Implementation
NUIPushNotification({
this.header,
this.body,
this.smallIcon,
this.largeIcon,
this.launchUrl,
this.meta,
this.data,
OSNotification? osNotification
}){
if(osNotification != null){
header = osNotification.title ?? "";
body = osNotification.body ?? "";
smallIcon = osNotification.smallIcon;
largeIcon = osNotification.largeIcon;
launchUrl = osNotification.launchUrl;
data = osNotification.additionalData ?? Map();
// get iStudio metadata
if(osNotification.additionalData?.containsKey("meta") == true){
final meta = osNotification.additionalData!["meta"];
this.meta = NUIPushMeta();
this.meta?.type = meta.optString("type");
this.meta?.recipientId = meta.optString("recipientId");
this.meta?.actionType = meta.optString("actionType");
}
}
}