isEmail property
Check if the string is a valid email address
Implementation
bool get isEmail {
final emailRegex = RegExp(r'^[\w\.-]+@[a-zA-Z\d\.-]+\.[a-zA-Z]{2,}$');
return emailRegex.hasMatch(this);
}
Check if the string is a valid email address
bool get isEmail {
final emailRegex = RegExp(r'^[\w\.-]+@[a-zA-Z\d\.-]+\.[a-zA-Z]{2,}$');
return emailRegex.hasMatch(this);
}