pattern_formatter 2.0.0 icon indicating copy to clipboard operation
pattern_formatter: ^2.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(),
  ],
)
182
likes
140
pub points
96%
popularity

Publisher

verified publisher iconhunghd.dev

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

Homepage

Documentation

API reference

License

Icon for licenses.BSD-3-Clause (LICENSE)

Dependencies

flutter, intl

More

Packages that depend on pattern_formatter