fromJson static method
Implementation
static CountryInfo? fromJson(Map<String, dynamic>? json) {
if (json == null) {
return null;
}
return CountryInfo(
countryCode: (json['country_code'] as String?) ?? '',
name: (json['name'] as String?) ?? '',
englishName: (json['english_name'] as String?) ?? '',
flagEmoji: (json['flag_emoji'] as String?) ?? '',
isHidden: (json['is_hidden'] as bool?) ?? false,
callingCodes: List<String>.from(
tdListFromJson(
json['calling_codes'],
).map((item) => (item as dynamic)?.toString() ?? ''),
),
);
}