Skip to content
pubscout

multi_masked_formatter

1.0.0, released 4 years ago by an unverified publisher

Flutter TextInputFormatter plugin to handle multiple input masks for text fields.

WASM-ready
$ flutter pub add multi_masked_formatter
Source repository

What it does

Provides a text input formatter that supports multiple masks, making it suitable for fields like phone numbers and dates of birth that can take different length formats. Allows specifying a list of masks and a separator character.

AI-written summary of version 1.0.0, based on the package's README and metadata. Report an inaccuracy

Use it when

  • You need text fields that can format input dynamically against multiple possible mask patterns.
  • You are collecting phone numbers or dates of birth with variable formats.

Skip it when

  • You only require a single static input mask.
  • You need complex form validation logic beyond basic text formatting.

Strengths

  • Supports switching between multiple masks dynamically.
  • Simple integration via standard Flutter TextInputFormatter.

Weaknesses

  • Very limited scope focusing only on multiple mask formatting.
  • Lacks advanced validation features.

Setup

Kind
Flutter widgets
Effort
Low
Code generation
No
Direct dependencies
0
TextField(
  inputFormatters: [
    MultiMaskedTextInputFormatter(
        masks: ['xxx-xxxx-xxxx', 'xxx-xxx-xxxx'], separator: '-')
  ],
  autofocus: true,
  keyboardType: TextInputType.number,
  decoration:
      InputDecoration(
        labelText: 'PhoneNumber',
        hintText: '010-123-4567 or 010-1234-5678'),
);

Alternatives

Packages that do the same job and could replace multi_masked_formatter.