GrowlyticsData.fromJson constructor

GrowlyticsData.fromJson(
  1. Map<String, dynamic> json
)

Implementation

GrowlyticsData.fromJson(Map<String, dynamic> json) {
  type = json['type'];
  title = json['title'];
  message = json['message'];
  summaryText = json['summaryText'];
  channel = json['channel'];
  media = json['media'] != null ? new Media.fromJson(json['media']) : null;
  click = json['click'] != null ? new Click.fromJson(json['click']) : null;
  if (json['buttons'] != null) {
    buttons = <NotificationButtons>[];
    json['buttons'].forEach((v) {
      buttons!.add(new NotificationButtons.fromJson(v));
    });
  }
  if (json['keyValuePairs'] != null) {
    keyValuePairs = <KeyValuePairs>[];
    json['keyValuePairs'].forEach((v) {
      keyValuePairs!.add(new KeyValuePairs.fromJson(v));
    });
  }

  deliveryReport = json['deliveryReport'] != null
      ? new DeliveryReport.fromJson(json['deliveryReport'])
      : null;
}