getCountryByIsoCode static method
Implementation
static Country getCountryByIsoCode(String isoCode) {
try {
return countryList.firstWhere(
(country) => country.isoCode!.toLowerCase() == isoCode.toLowerCase(),
);
} catch (error) {
throw Exception("The initialValue provided is not a supported iso code!");
}
}