TextInputFormatFunction typedef Null safety

TextInputFormatFunction = TextEditingValue Function(TextEditingValue oldValue, TextEditingValue newValue)

Function signature expected for creating custom TextInputFormatter shorthands via TextInputFormatter.withFunction.

Implementation

typedef TextInputFormatFunction = TextEditingValue Function(
  TextEditingValue oldValue,
  TextEditingValue newValue,
);