verifyE164 function
Implementation
String? verifyE164(String phone) {
phone = phone.trim().replaceAll(RegExp(r'[()\-\s]'), '');
if (!phone.startsWith("+")) phone = "+1$phone";
if (!RegExp(r'^\+[0-9]{11,15}$').hasMatch(phone)) return null;
return phone;
}