toJson method

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() {
  final action = this.action;
  final body = this.body;
  final consolidationKey = this.consolidationKey;
  final data = this.data;
  final expiresAfter = this.expiresAfter;
  final iconReference = this.iconReference;
  final imageIconUrl = this.imageIconUrl;
  final imageUrl = this.imageUrl;
  final md5 = this.md5;
  final rawContent = this.rawContent;
  final silentPush = this.silentPush;
  final smallImageIconUrl = this.smallImageIconUrl;
  final sound = this.sound;
  final substitutions = this.substitutions;
  final title = this.title;
  final url = this.url;
  return {
    if (action != null) 'Action': action.toValue(),
    if (body != null) 'Body': body,
    if (consolidationKey != null) 'ConsolidationKey': consolidationKey,
    if (data != null) 'Data': data,
    if (expiresAfter != null) 'ExpiresAfter': expiresAfter,
    if (iconReference != null) 'IconReference': iconReference,
    if (imageIconUrl != null) 'ImageIconUrl': imageIconUrl,
    if (imageUrl != null) 'ImageUrl': imageUrl,
    if (md5 != null) 'MD5': md5,
    if (rawContent != null) 'RawContent': rawContent,
    if (silentPush != null) 'SilentPush': silentPush,
    if (smallImageIconUrl != null) 'SmallImageIconUrl': smallImageIconUrl,
    if (sound != null) 'Sound': sound,
    if (substitutions != null) 'Substitutions': substitutions,
    if (title != null) 'Title': title,
    if (url != null) 'Url': url,
  };
}