isAlphabetic method

bool isAlphabetic(
  1. String? s
)

验证是否为纯字母

Implementation

bool isAlphabetic(String? s) {
  if (s == null || s.isEmpty) return false;
  const pattern = r'^[a-zA-Z]+$';
  return hasMatch(s, pattern);
}