isEmail function

bool isEmail(
  1. String str
)

Checks if the string is a valid email address.

Uses a regular expression to verify if the string matches standard email format. Validates both local part (before @) and domain part (after @) of the email.

Returns true if the string is a valid email address, otherwise returns false.

Example:

isEmail('user@example.com'); // true
isEmail('user.name+tag@example.co.uk'); // true
isEmail('invalid@email'); // false

Implementation

bool isEmail(String str) => _isEmail(str);