MaskTextFormatter class

Process format masked text

Default keys use the following wildcard characters

  • * : any character
  • 0 : number only, 0-9
  • A : letter only, a-zA-Z
  • # : number or letter
Inheritance

Constructors

MaskTextFormatter({required String mask, Map<String, RegExp>? keys, String holder = '_', bool includeLiteral = false})
Create a mask text input

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

format(String value) String
Format value to text
override
formatEditUpdate(TextEditingValue oldValue, TextEditingValue newValue) TextEditingValue
Called when text is being typed or cut/copy/pasted in the EditableText.
override
isValid(String text) bool
Check current text is valid to parse or not
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
parse(String text) String
Parser text to value
override
toString() String
A string representation of this object.
inherited

Operators

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