isEmail property

bool get isEmail

Checks if the string is a valid email address.

Implementation

bool get isEmail =>
    RegExp(r'^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,}\$')
        .hasMatch(this);