removeCountryCode static method
Removes a country code from a phone
Implementation
static String removeCountryCode(
String phoneWithCountryCode,
) {
final countryData = getCountryDataByPhone(phoneWithCountryCode);
if (countryData != null) {
phoneWithCountryCode = phoneWithCountryCode.replaceAll('+', '').trim();
return phoneWithCountryCode.substring(countryData.phoneCode!.length);
}
return phoneWithCountryCode;
}