phone static method

use to format phone fields

TextFormField(
  autovalidateMode: AutovalidateMode.onUserInteraction,
  inputFormatters: [Mask.phone()],
),

Implementation

static TextInputFormatter phone() {
  return GenericMask(mask: ['(##) ####-####', '(##) # ####-####']);
}