isEmail function

bool isEmail(
  1. String input
)

Returns true if input is a valid email address.

Implementation

bool isEmail(String input) {
  final regex = RegExp(r'^[\w\.-]+@[\w\.-]+\.\w+$');
  return regex.hasMatch(input);
}