Validates if the given string is a valid email address.
static bool isValidEmail(String email) { final regex = RegExp(r'^[^@\s]+@[^@\s]+\.[^@\s]+\$'); return regex.hasMatch(email); }