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.
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.
- flutter_multi_formatter
Input formatters for international phone numbers, credit/debit cards, currencies, and custom masks.
75Compare - form_builder_phone_field
International phone number input field for the flutter_form_builder package.
70Compare - flutter_masked_text2
Masked and money text input controllers for Flutter text fields.
50Compare - masked_text_field
A Flutter widget providing a masked text field for formatting user input.
41Compare