getPhoneCountryDataByCountryCode static method
Find a PhoneCountryData by a two-symbol country code like "US" or "RU"
Implementation
static PhoneCountryData? getPhoneCountryDataByCountryCode(
String countryCode,
) {
if (countryCode.length != 2) {
return null;
}
countryCode = countryCode.toUpperCase();
final Map? countryData = _data.firstWhereOrNull(
(d) => d['countryCode'] == countryCode,
);
if (countryData != null) {
return PhoneCountryData.fromMap(countryData);
}
return null;
}