pattern_formatter 4.0.0 copy "pattern_formatter: ^4.0.0" to clipboard
pattern_formatter: ^4.0.0 copied to clipboard

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

PatternFormatter #

pub package codecov

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

How to use #

import 'package:pattern_formatter/pattern_formatter.dart';

Thousands grouping #

  • Integer number:

TextField(
  keyboardType: TextInputType.number,
  inputFormatters: [
    ThousandsFormatter()
  ],
)
  • Decimal number:

TextField(
  keyboardType: TextInputType.number,
  inputFormatters: [
    ThousandsFormatter(allowFraction: true)
  ],
)

Card number grouping #

TextField(
  keyboardType: TextInputType.number,
  inputFormatters: [
    CreditCardFormatter(),
  ],
)

Date format #

TextField(
  keyboardType: TextInputType.number,
  inputFormatters: [
    DateInputFormatter(),
  ],
)
290
likes
150
pub points
97%
popularity

Publisher

verified publisherhunghd.dev

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

Repository (GitHub)
View/report issues

Documentation

API reference

License

BSD-3-Clause (license)

Dependencies

flutter, intl

More

Packages that depend on pattern_formatter