isLatin method

bool isLatin()

Checks if the string contains only Latin alphabet characters (a-z, A-Z).

Implementation

bool isLatin() =>
    // Use a regular expression to match only alphabetic characters from start to end.
    RegExp(r'^[a-zA-Z]+$').hasMatch(this);