TextInputMask class

TextInputMask extends the TextInputFormatter to make your life better! Just initiate it with the mask as string and it's done.

Inheritance

Constructors

TextInputMask({dynamic mask, bool reverse = false, int maxLength = -1, String placeholder = '', int maxPlaceHolders = -1})
mask is the String or Array of Strings to be used as mask(s). reverse is a bool. When true it will mask on reverse mode, usually to be used on currency fields. maxLength can be used to limit the maximum length. Leave it null or -1 to not limitate placeholder is a string to be applyed on untyped characters. maxPlaceHolders max times a placeholder is counted. Typed characters consumes the counter. ex placeholder as '0' with max=3 on a text like '3' with mask 9+.99 will be 0.03 not 000000.03

Properties

hashCode int
The hash code for this object.
no setterinherited
magicMask MagicMask
getter/setter pair
mask ↔ dynamic
getter/setter pair
maxLength int
getter/setter pair
maxPlaceHolders int
getter/setter pair
placeholder String
getter/setter pair
reverse bool
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

formatEditUpdate(TextEditingValue oldValue, TextEditingValue newValue) TextEditingValue
Called when text is being typed or cut/copy/pasted in the EditableText.
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