isPhoneNumber method
Checks if the string is a valid phone number (basic check).
Implementation
bool isPhoneNumber() {
final phoneRegex = RegExp(r'^\+?[0-9]{7,15}$');
return phoneRegex.hasMatch(this);
}
Checks if the string is a valid phone number (basic check).
bool isPhoneNumber() {
final phoneRegex = RegExp(r'^\+?[0-9]{7,15}$');
return phoneRegex.hasMatch(this);
}