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