updateMask method

void updateMask(
  1. String newMask,
  2. {bool shouldMoveCursorToEnd = true}
)

Replaces mask with a newMask and moves cursor to the end if shouldMoveCursorToEnd is true

Implementation

void updateMask(String newMask, {bool shouldMoveCursorToEnd = true}) {
  mask = newMask;
  updateText(text);

  if (shouldMoveCursorToEnd) {
    moveCursorToEnd();
  }
}