alphabetFormatter static method

List<TextInputFormatter> alphabetFormatter()

alphabetFormatter allows only alphabetic input.

Implementation

static List<TextInputFormatter> alphabetFormatter() {
  return [FilteringTextInputFormatter.allow(RegExp(r'[a-zA-Z]'))];
}