isEmail method

bool isEmail()

判断是否是邮箱

Implementation

bool isEmail() {
  String regexEmail = '[A-Z0-9a-z._%+-]+@[A-Za-z0-9.-]+\\.[A-Za-z]{2,4}';
  return RegExp(regexEmail).hasMatch(this);
}