CountryCode.fromCountryCode constructor

CountryCode.fromCountryCode(
  1. String countryCode
)

Implementation

factory CountryCode.fromCountryCode(String countryCode) {
  final Map<String, String>? jsonCode = codes.firstWhereOrNull(
    (code) => code['code'] == countryCode,
  );
  return CountryCode.fromJson(jsonCode!);
}