MastheadAd.fromJson constructor

MastheadAd.fromJson(
  1. Map json_
)

Implementation

MastheadAd.fromJson(core.Map json_)
    : this(
        autoplayVideoDuration: json_.containsKey('autoplayVideoDuration')
            ? json_['autoplayVideoDuration'] as core.String
            : null,
        autoplayVideoStartMillisecond:
            json_.containsKey('autoplayVideoStartMillisecond')
                ? json_['autoplayVideoStartMillisecond'] as core.String
                : null,
        callToActionButtonLabel: json_.containsKey('callToActionButtonLabel')
            ? json_['callToActionButtonLabel'] as core.String
            : null,
        callToActionFinalUrl: json_.containsKey('callToActionFinalUrl')
            ? json_['callToActionFinalUrl'] as core.String
            : null,
        callToActionTrackingUrl: json_.containsKey('callToActionTrackingUrl')
            ? json_['callToActionTrackingUrl'] as core.String
            : null,
        companionYoutubeVideos: json_.containsKey('companionYoutubeVideos')
            ? (json_['companionYoutubeVideos'] as core.List)
                .map((value) => YoutubeVideoDetails.fromJson(
                    value as core.Map<core.String, core.dynamic>))
                .toList()
            : null,
        description: json_.containsKey('description')
            ? json_['description'] as core.String
            : null,
        headline: json_.containsKey('headline')
            ? json_['headline'] as core.String
            : null,
        showChannelArt: json_.containsKey('showChannelArt')
            ? json_['showChannelArt'] as core.bool
            : null,
        video: json_.containsKey('video')
            ? YoutubeVideoDetails.fromJson(
                json_['video'] as core.Map<core.String, core.dynamic>)
            : null,
        videoAspectRatio: json_.containsKey('videoAspectRatio')
            ? json_['videoAspectRatio'] as core.String
            : null,
      );