toJson method

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() {
  final action = this.action;
  final body = this.body;
  final imageIconUrl = this.imageIconUrl;
  final imageUrl = this.imageUrl;
  final rawContent = this.rawContent;
  final smallImageIconUrl = this.smallImageIconUrl;
  final sound = this.sound;
  final title = this.title;
  final url = this.url;
  return {
    if (action != null) 'Action': action.toValue(),
    if (body != null) 'Body': body,
    if (imageIconUrl != null) 'ImageIconUrl': imageIconUrl,
    if (imageUrl != null) 'ImageUrl': imageUrl,
    if (rawContent != null) 'RawContent': rawContent,
    if (smallImageIconUrl != null) 'SmallImageIconUrl': smallImageIconUrl,
    if (sound != null) 'Sound': sound,
    if (title != null) 'Title': title,
    if (url != null) 'Url': url,
  };
}