getCountryByPhoneCode static method
Implementation
static Country? getCountryByPhoneCode(String? phoneCode) {
try {
return countryList.firstWhere(
(country) =>
country.phoneCode.toLowerCase() == phoneCode?.toLowerCase(),
);
} catch (error) {
return null;
}
}