FilteringTextInputFormatter.allow constructor Null safety

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

Creates a formatter that only allows characters matching a pattern.

The filterPattern and replacementString arguments must not be null.

Implementation

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