customAllow static method

List<TextInputFormatter> customAllow(
  1. List<RegExp> patterns
)

Creates a custom formatter that only allows specified patterns patterns - List of RegExp patterns to allow

Implementation

static List<TextInputFormatter> customAllow(List<RegExp> patterns) {
  return patterns
      .map((RegExp pattern) => FilteringTextInputFormatter.allow(pattern))
      .toList();
}