isPhone property

bool get isPhone

Returns true if the string is a valid Indian phone number (10 digits).

Implementation

bool get isPhone =>
    !isNullOrEmpty &&
        RegExp(r"^[6-9]\d{9}$").hasMatch(this!);