MaskInputFormatter class

A MaskInputFormatter class is used for masking text inserted in TextField and TextFormField.

This is a class which extends TextInputFormatter class, TextInputFormatter can be optionally injected into an EditableText to provide as-you-type validation and formatting of the text being edited.

Inheritance

Constructors

MaskInputFormatter({required String? mask, bool? textAllCaps})
The constructor of MaskInputFormatter class accepts two arguments.

Properties

hashCode int
The hash code for this object.
no setterinherited
mask String?
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
textAllCaps bool?
getter/setter pair

Methods

formatEditUpdate(TextEditingValue oldValue, TextEditingValue newValue) TextEditingValue
method to format user input into given mask
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited