MaskedTextController constructor
Implementation
MaskedTextController(
{String? text, required this.mask, Map<String, RegExp>? translator})
: super(text: text) {
this.translator = translator ?? MaskedTextController.getDefaultTranslator();
addListener(() {
final String previous = _lastUpdatedText;
if (beforeChange(previous, this.text)) {
updateText(this.text);
afterChange(previous, this.text);
} else {
updateText(_lastUpdatedText);
}
});
updateText(this.text);
}