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