regExp static method

TextInputFormatter regExp(
  1. String pattern
)
formatters: [
  MixinsFormatter.regExp('[a-zA-Z]')
]

Implementation

static TextInputFormatter regExp(String pattern) =>
    FilteringTextInputFormatter.allow(RegExp(pattern));