GeoMatchStatement.fromJson constructor

GeoMatchStatement.fromJson(
  1. Map<String, dynamic> json
)

Implementation

factory GeoMatchStatement.fromJson(Map<String, dynamic> json) {
  return GeoMatchStatement(
    countryCodes: (json['CountryCodes'] as List?)
        ?.whereNotNull()
        .map((e) => (e as String).toCountryCode())
        .toList(),
    forwardedIPConfig: json['ForwardedIPConfig'] != null
        ? ForwardedIPConfig.fromJson(
            json['ForwardedIPConfig'] as Map<String, dynamic>)
        : null,
  );
}