CreativeNativeAd.fromJson constructor

CreativeNativeAd.fromJson(
  1. Map _json
)

Implementation

CreativeNativeAd.fromJson(core.Map _json) {
  if (_json.containsKey("advertiser")) {
    advertiser = _json["advertiser"];
  }
  if (_json.containsKey("appIcon")) {
    appIcon = new CreativeNativeAdAppIcon.fromJson(_json["appIcon"]);
  }
  if (_json.containsKey("body")) {
    body = _json["body"];
  }
  if (_json.containsKey("callToAction")) {
    callToAction = _json["callToAction"];
  }
  if (_json.containsKey("clickLinkUrl")) {
    clickLinkUrl = _json["clickLinkUrl"];
  }
  if (_json.containsKey("clickTrackingUrl")) {
    clickTrackingUrl = _json["clickTrackingUrl"];
  }
  if (_json.containsKey("headline")) {
    headline = _json["headline"];
  }
  if (_json.containsKey("image")) {
    image = new CreativeNativeAdImage.fromJson(_json["image"]);
  }
  if (_json.containsKey("impressionTrackingUrl")) {
    impressionTrackingUrl =
        (_json["impressionTrackingUrl"] as core.List).cast<core.String>();
  }
  if (_json.containsKey("logo")) {
    logo = new CreativeNativeAdLogo.fromJson(_json["logo"]);
  }
  if (_json.containsKey("price")) {
    price = _json["price"];
  }
  if (_json.containsKey("starRating")) {
    starRating = _json["starRating"].toDouble();
  }
  if (_json.containsKey("videoURL")) {
    videoURL = _json["videoURL"];
  }
}