toJson method
Implementation
Map<String, dynamic> toJson() {
final map = <String, dynamic>{};
map['id'] = id;
map['iso2Code'] = iso2Code;
map['name'] = name;
if (region != null) {
map['region'] = region?.toJson();
}
if (adminregion != null) {
map['adminregion'] = adminregion?.toJson();
}
if (incomeLevel != null) {
map['incomeLevel'] = incomeLevel?.toJson();
}
if (lendingType != null) {
map['lendingType'] = lendingType?.toJson();
}
map['capitalCity'] = capitalCity;
map['longitude'] = longitude;
map['latitude'] = latitude;
return map;
}