isEmail property

bool get isEmail

Implementation

bool get isEmail {
  if (this == null) return false;
  final emailRegex = RegExp(r'^[\w-\.]+@([\w-]+\.)+[\w-]{2,4}$');
  return emailRegex.hasMatch(this!.trim());
}