isAlphabetsOnly static method
Check if string contains only alphabets
text - The text to validate
Returns true if text contains only alphabets
Implementation
static bool isAlphabetsOnly(String text) {
return RegExp(r'^[a-zA-Z\s]+$').hasMatch(text);
}