Country.fromJson constructor
Implementation
factory Country.fromJson(Map<String, dynamic> json) {
return Country(
countryID: json['countryID'],
name: json['name'],
countryCode: json['countryCode'],
phoneCode: json['phoneCode'],
provinceList: json['provinceList'] != null
? (json['provinceList'] as List<dynamic>?)
?.map((friendJson) => Province.fromJson(friendJson))
.toList()
: null,
);
}