Country.fromJson constructor
Implementation
factory Country.fromJson(Map<String, dynamic> json) {
return Country(
id: json['id'],
lang: json['lang'],
code: json['code'],
alpha3Code: json['alpha3_code'],
name: json['name'],
allowedDocs: List<String>.from(json['allowed_docs']),
flag: json['flag'],
avatar: json['avatar'],
documents: (json['documents'] as List)
.map((doc) => DocumentType.fromJson(doc))
.toList(),
);
}