pattern_input_formatter
0.1.1, released a year ago by an unverified publisher
Custom TextInputFormatter for Flutter supporting user-defined patterns, placeholders, and cursor management.
What it does
Provides a custom TextInputFormatter to automatically format text input in Flutter applications based on patterns like phone numbers, dates, and serial numbers. It handles flexible placeholders, letter case control, intelligent cursor positioning, and built-in date/time validation.
AI-written summary of version 0.1.1, based on the package's README and metadata. Report an inaccuracy
Use it when
- You need to format user inputs like phone numbers, credit card numbers, or postal codes using specific patterns.
- You require built-in date and time validation during typing with custom pattern orders.
- You want to manage cursor positions intuitively during input or deletion.
Skip it when
- You need a complete form validation and state management framework rather than just a text input formatter.
Strengths
- Supports custom patterns with flexible placeholders for digits and letters.
- Built-in validation for date and time inputs including leap years.
- Intelligent cursor management and configurable letter case options.
Weaknesses
- Limited to input formatting tasks on TextField widgets.
Setup
- Kind
- Flutter widgets
- Effort
- Low
- Code generation
- No
- Direct dependencies
- 0
TextField(
decoration: const InputDecoration(
hintText: '(###) ###-####',
border: OutlineInputBorder(),
),
keyboardType: TextInputType.phone,
inputFormatters: [
FilteringTextInputFormatter.digitsOnly,
PatternInputFormatter(pattern: '(###) ###-####'),
],
)Alternatives
Packages that do the same job and could replace pattern_input_formatter.
- currency_text_input_formatter
Currency text input formatter for Flutter with localization and symbol support.
86Compare - flutter_masked_text2
Masked and money text input controllers for Flutter text fields.
50Compare - validatorless
Provides a means to validate text inputs on Flutter inspired by Yup.
79Compare - pattern_formatter
Provides implementations of TextInputFormatter to format input with pre-defined patterns.
82Compare