CountryInfo.fromJson constructor

CountryInfo.fromJson(
  1. Map<String, dynamic> json
)

Parse from a json

Implementation

factory CountryInfo.fromJson(Map<String, dynamic> json) => CountryInfo(
      countryCode: json['country_code'],
      name: json['name'],
      englishName: json['english_name'],
      isHidden: json['is_hidden'],
      callingCodes: List<String>.from(
          (json['calling_codes'] ?? []).map((item) => item).toList()),
    );