FLUTTER ECOSYSTEM

pattern_formatter

A Flutter package provides some implementations of TextInputFormatter that format input with pre-defined patterns

pattern_formatter cover
Latest version
4.0.1
30-day downloads
27.7K
Likes
309
Pub points
150

Package Overview

Selection guidance generated from public package information. For reference only.

Overview

Pattern Formatter is a Flutter package that offers customizable TextInputFormatter implementations to format user input according to predefined patterns. It enables developers to create masked inputs such as phone numbers, dates, or custom formats with ease. The package supports multiple platforms including Android, iOS, Web, macOS, Windows, and Linux, ensuring consistent behavior across devices. It simplifies form handling by automatically applying formatting as users type, improving UX for structured data entry.

Use cases
  • Form inputs with fixed formats
  • Phone number masking
  • Date and time input formatting
  • Credit card number formatting
  • Custom pattern-based text input
  • Dynamic mask generation
Key features
  • Predefined pattern templates
  • Real-time input formatting
  • Cross-platform compatibility
  • Extensible pattern definitions
  • Simple integration with TextFormField
  • Supports dynamic and static masks
Suitable for
  • Developers building forms with structured input
  • Apps requiring formatted data entry
  • Projects needing consistent input styling
  • Teams prioritizing UX in data collection
  • Mobile and web applications with input validation needs
Considerations
  • May require careful pattern definition to avoid conflicts
  • Limited built-in patterns (custom logic needed for complex cases)
  • Potential performance impact with very long patterns
  • Not designed for non-text input types
  • Requires understanding of TextEditingValue and formatter flow
Supported platformsAndroidiOSWebmacOSWindowsLinux

Install package

flutter pub add pattern_formatter

Categories

Source repository

Related projects