isEmail method
Checks if the string is a valid email.
Implementation
bool isEmail() {
final emailRegex = RegExp(r'^[\w-]+(\.[\w-]+)*@[\w-]+(\.[\w-]+)+$');
return emailRegex.hasMatch(this);
}
Checks if the string is a valid email.
bool isEmail() {
final emailRegex = RegExp(r'^[\w-]+(\.[\w-]+)*@[\w-]+(\.[\w-]+)+$');
return emailRegex.hasMatch(this);
}