countryOfDialCode static method
Country of a dial code, e.g. "+98" → Iran.
Implementation
static UCountry? countryOfDialCode(String? countryCode) {
if (countryCode == null || countryCode.trim().isEmpty) return null;
final String code = dialCodeOf(countryCode);
return UCountries.byIsoCode(primaryCountryByDialCode[code]) ?? UCountries.byDialCode(code);
}