maskText method

String maskText(
  1. String text
)

Mask the text.

Implementation

String maskText(String text) {
  return MaskFunctionTextInputFormatter(
    maskFunction: ({required TextEditingValue oldValue, required TextEditingValue newValue}) =>
        _mask,
    filter: _maskFilter,
    initialText: text,
  ).getMaskedText();
}