date static method

use to format date fields

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

Implementation

static TextInputFormatter date() {
  return GenericMask(mask: ['##/##/####']);
}