GeoTargeting.fromJson constructor

GeoTargeting.fromJson(
  1. Map json_
)

Implementation

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