validateEmail method

bool validateEmail (
  1. String email
)

Implementation

bool validateEmail(String email) {
  if (RegExp(r"^[a-zA-Z0-9._]+@[a-zA-Z0-9]+\.[a-zA-Z]+").hasMatch(email)) {
    return true;
  } else {
    return false;
  }
}