getRegionInfoFromPhoneNumber static method
Implementation
static Future<PhoneNumberTest> getRegionInfoFromPhoneNumber(
String phoneNumber, [
String isoCode = '',
]) async {
RegionInfo regionInfo = await PhoneNumberUtil.getRegionInfo(
phoneNumber: phoneNumber, isoCode: isoCode);
String? internationalPhoneNumber =
await PhoneNumberUtil.normalizePhoneNumber(
phoneNumber: phoneNumber,
isoCode: regionInfo.isoCode ?? isoCode,
);
return PhoneNumberTest(
phoneNumber: internationalPhoneNumber,
dialCode: regionInfo.regionPrefix,
isoCode: regionInfo.isoCode);
}