inputFormatters property
Optional input validation and formatting overrides.
Formatters are run in the provided order when the user changes the text this widget contains. When this parameter changes, the new formatters will not be applied until the next time the user inserts or deletes text. Similar to the onChanged callback, formatters don't run when the text is changed programmatically via controller.
See also:
- TextEditingController, which implements the Listenable interface
and notifies its listeners on TextEditingValue changes.
The input formatters to use for the text field.
By default, the input formatters are FilteringTextInputFormatter.digitsOnly.
By default, the input formatters are LengthLimitingTextInputFormatter with the length of the selected country's max length.
If you want to change InputFormatter, you can pass your own list of
TextInputFormatter
.
Implementation
final List<TextInputFormatter>? inputFormatters;