FilteringTextInputFormatter.allow constructor

FilteringTextInputFormatter.allow(
  1. Pattern filterPattern,
  2. {String replacementString = ''}
)

Creates a formatter that only allows characters matching a pattern.

Implementation

FilteringTextInputFormatter.allow(
  Pattern filterPattern, {
  String replacementString = '',
}) : this(filterPattern, allow: true, replacementString: replacementString);