toJson method
Implementation
Map<String, dynamic> toJson() {
final action = this.action;
final body = this.body;
final collapseKey = this.collapseKey;
final data = this.data;
final iconReference = this.iconReference;
final imageIconUrl = this.imageIconUrl;
final imageUrl = this.imageUrl;
final priority = this.priority;
final rawContent = this.rawContent;
final restrictedPackageName = this.restrictedPackageName;
final silentPush = this.silentPush;
final smallImageIconUrl = this.smallImageIconUrl;
final sound = this.sound;
final substitutions = this.substitutions;
final timeToLive = this.timeToLive;
final title = this.title;
final url = this.url;
return {
if (action != null) 'Action': action.toValue(),
if (body != null) 'Body': body,
if (collapseKey != null) 'CollapseKey': collapseKey,
if (data != null) 'Data': data,
if (iconReference != null) 'IconReference': iconReference,
if (imageIconUrl != null) 'ImageIconUrl': imageIconUrl,
if (imageUrl != null) 'ImageUrl': imageUrl,
if (priority != null) 'Priority': priority,
if (rawContent != null) 'RawContent': rawContent,
if (restrictedPackageName != null)
'RestrictedPackageName': restrictedPackageName,
if (silentPush != null) 'SilentPush': silentPush,
if (smallImageIconUrl != null) 'SmallImageIconUrl': smallImageIconUrl,
if (sound != null) 'Sound': sound,
if (substitutions != null) 'Substitutions': substitutions,
if (timeToLive != null) 'TimeToLive': timeToLive,
if (title != null) 'Title': title,
if (url != null) 'Url': url,
};
}