CreativeSize.fromJson constructor

CreativeSize.fromJson(
  1. Map json_
)

Implementation

CreativeSize.fromJson(core.Map json_)
    : this(
        allowedFormats: json_.containsKey('allowedFormats')
            ? (json_['allowedFormats'] as core.List)
                .map((value) => value as core.String)
                .toList()
            : null,
        companionSizes: json_.containsKey('companionSizes')
            ? (json_['companionSizes'] as core.List)
                .map((value) => Size.fromJson(
                    value as core.Map<core.String, core.dynamic>))
                .toList()
            : null,
        creativeSizeType: json_.containsKey('creativeSizeType')
            ? json_['creativeSizeType'] as core.String
            : null,
        nativeTemplate: json_.containsKey('nativeTemplate')
            ? json_['nativeTemplate'] as core.String
            : null,
        size: json_.containsKey('size')
            ? Size.fromJson(
                json_['size'] as core.Map<core.String, core.dynamic>)
            : null,
        skippableAdType: json_.containsKey('skippableAdType')
            ? json_['skippableAdType'] as core.String
            : null,
      );