toJson method

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() {
  final Map<String, dynamic> data = new Map<String, dynamic>();
  data['type'] = this.type;
  data['title'] = this.title;
  data['message'] = this.message;
  data['summaryText'] = this.summaryText;
  data['channel'] = this.channel;
  if (this.media != null) {
    data['media'] = this.media!.toJson();
  }
  if (this.click != null) {
    data['click'] = this.click!.toJson();
  }
  if (this.buttons != null) {
    //  data['buttons'] = this.buttons!.map((v) => v.toJson()).toList();
  }
  data['keyValuePairs'] = this.keyValuePairs;
  if (this.deliveryReport != null) {
    data['deliveryReport'] = this.deliveryReport!.toJson();
  }
  return data;
}