isEmail method
Validates if the given email is in a proper email format.
Returns true if the email is valid, otherwise false.
Implementation
bool isEmail(String email) {
bool emailValid = RegExp(
r"^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$"
).hasMatch(email);
return emailValid;
}