Country.fromJson constructor
Implementation
Country.fromJson(Map<String, dynamic> json) {
id = json['id'];
name = json['name'];
nameAr = json['name_ar'];
emoji = json['emoji'];
emojiU = json['emojiU'];
iso2 = json['iso2'];
iso3 = json['iso3'];
countrycode = json['countrycode'];
frenchname = json['frenchname'];
if (json['state'] != null) {
state = [];
json['state'].forEach((v) {
state!.add(Region.fromJson(v));
});
}
}