isAlphabetOnly property

bool get isAlphabetOnly

Returns true if the string contains only alphabets.

Implementation

bool get isAlphabetOnly =>
    !isNullOrEmpty &&
        RegExp(r"^[a-zA-Z]+$").hasMatch(this!);