updateText method

void updateText(
  1. String newText
)

Updates the current text with a new one applying the mask

Implementation

void updateText(String newText) {
  assert(newText != null, 'Text must not be null');
  text = (newText != null) ? _applyMask(mask, newText) : '';
  _lastUpdatedText = text;
  moveCursorToEnd();
}