isValidEmail static method
Implementation
static bool isValidEmail(String email) {
// Regular expression pattern for validating an email address
final RegExp emailRegExp = RegExp(
r"^[a-zA-Z0-9.a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9]+\.[a-zA-Z]+",
);
// Return true if the email matches the regex pattern
return emailRegExp.hasMatch(email);
}