GeoTargeting.fromJson constructor

GeoTargeting.fromJson(
  1. Map json_
)

Implementation

GeoTargeting.fromJson(core.Map json_)
    : this(
        cities: json_.containsKey('cities')
            ? (json_['cities'] as core.List)
                .map((value) => City.fromJson(
                    value as core.Map<core.String, core.dynamic>))
                .toList()
            : null,
        countries: json_.containsKey('countries')
            ? (json_['countries'] as core.List)
                .map((value) => Country.fromJson(
                    value as core.Map<core.String, core.dynamic>))
                .toList()
            : null,
        excludeCountries: json_.containsKey('excludeCountries')
            ? json_['excludeCountries'] as core.bool
            : null,
        metros: json_.containsKey('metros')
            ? (json_['metros'] as core.List)
                .map((value) => Metro.fromJson(
                    value as core.Map<core.String, core.dynamic>))
                .toList()
            : null,
        postalCodes: json_.containsKey('postalCodes')
            ? (json_['postalCodes'] as core.List)
                .map((value) => PostalCode.fromJson(
                    value as core.Map<core.String, core.dynamic>))
                .toList()
            : null,
        regions: json_.containsKey('regions')
            ? (json_['regions'] as core.List)
                .map((value) => Region.fromJson(
                    value as core.Map<core.String, core.dynamic>))
                .toList()
            : null,
      );