checkValidateEmail static method

bool checkValidateEmail(
  1. BuildContext context,
  2. String input
)

checkValidateEmail Check validate email address

Implementation

static bool checkValidateEmail(BuildContext context, String input) {
  final RegExp regExp = RegExp(Constants.regexEmail);
  if (input.isEmpty) {
    return false;
  } else if (!regExp.hasMatch(input)) {
    return false;
  } else {
    return true;
  }
}