isEmail method

bool isEmail()

Validates if the string is a valid email

Implementation

bool isEmail() => RegExp(r'^[\w-\.]+@([\w-]+\.)+[\w-]{2,4}$').hasMatch(this);