MagicMask class

This class is used to make all hardwork of making and controll the users cursor. It should be used by TextInputMask, so you dont need to worry about it. If you want you can use it as String masker.

Constructors

MagicMask()
MagicMask.buildMask(dynamic mask)

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

buildMaskTokens(dynamic masks) → void
the BuildMaskTokens will transform the String pattern in tokens to be used as formatter. The mask should a String following the pattern:
clearMask(String text) String
text is the text with mask that should be cleared.
executeMasking(String? text, int cursorPosition, bool reverse, int maxLenght, String placeholder, int maxPlaceHolderCharacters) Map<String, dynamic>
text is the mask to be formatter on mask. cursorPosition means the cursor position before masking. reverse is used to define the diretion mask will be applyed. maxLenght is used to limit the maximum returned text. Set it as -1 to not limitate. placeholder String character to be applyed as placeholder maxPlaceHolderCharacters Numbers of times the placeholder could be counted. A typed character consumes a count.
getAdvancedMaskedString(String text, int maxLenght, String placeholder, int maxPlaceHolderCharacters) String
text is the string to be formatted maxLenght is used to limit the maximum returned text. Set it as -1 to not limitate. placeholder String character to be applyed as placeholder maxPlaceHolderCharacters Numbers of times the placeholder could be counted. A typed character consumes a count.
getMaskedString(String text) String
text is the string to be formatted It returns a formatted String.
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