Check if a string is an email.
static bool email(String string) { RegExp regex = RegExp(r'\b[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Z|a-z]{2,7}\b'); return regex.hasMatch(string); }