isValidEmail static method
This function will check if the provided email ID is valid or not.
Implementation
static bool isValidEmail(String email) {
String p =
r"^[a-zA-Z0-9.a-zA-Z0-9.!#$%&'*+-/=?^_`{|}~]+@[a-zA-Z0-9]+\.[a-zA-Z]+";
RegExp regExp = RegExp(p);
return regExp.hasMatch(email);
}