isValidEmail static method
Implementation
static bool isValidEmail(String email) {
// Regular expression pattern for email validation
const pattern = r'^[\w-]+(\.[\w-]+)*@([\w-]+\.)+[a-zA-Z]{2,7}$';
final regex = RegExp(pattern);
return regex.hasMatch(email);
}