Country.fromJson constructor
Country.fromJson(
- Map<String, dynamic> json
)
Implementation
factory Country.fromJson(Map<String, dynamic> json) => Country(
id: json["id"],
name: json["name"],
iso3: json["iso3"],
iso2: json["iso2"],
numericCode: json["numeric_code"],
phoneCode: json["phone_code"],
capital: json["capital"],
currency: json["currency"],
currencyName: json["currency_name"],
currencySymbol: json["currency_symbol"],
tld: json["tld"],
native: json["native"],
region: json["region"],
subregion: json["subregion"],
timezones: json["timezones"] == null
? null
: List<Timezone>.from(
json["timezones"].map((x) => Timezone.fromJson(x))),
translations: json["translations"] == null
? null
: Translations.fromJson(json["translations"]),
latitude: json["latitude"],
longitude: json["longitude"],
emoji: json["emoji"],
emojiU: json["emojiU"],
);