MaskedTextController constructor

MaskedTextController(
  1. {@required String mask,
  2. String text,
  3. Map<String, RegExp> translator}
)

Implementation

MaskedTextController({
  @required this.mask,
  String text,
  Map<String, RegExp> translator,
})  : assert(mask != null),
      super(text: text) {
  this.translator = translator ?? MaskedTextController.getDefaultTranslator();

  addListener(() {
    updateText(this.text);
  });

  _lastUpdatedText = '';
  updateText(this.text);
}