withFunction static method

TextInputFormatter withFunction(
  1. TextInputFormatFunction formatFunction
)

A shorthand to creating a custom TextInputFormatter which formats incoming text input changes with the given function.

Implementation

static TextInputFormatter withFunction(
  TextInputFormatFunction formatFunction,
) {
  return _SimpleTextInputFormatter(formatFunction);
}