isEmail property

bool get isEmail

Returns true if this string is a valid email address.

Example: 'example@domain.com'.isEmail -> true.

Implementation

bool get isEmail =>
    RegExp(r'^[\w-]+(\.[\w-]+)*@[\w-]+(\.[\w-]+)+$').hasMatch(this);