pattern_formatter 2.0.0
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(),
  ],
)
67
likes
130
pub points
94%
popularity

Publisher

hunghd.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 (LICENSE)

Dependencies

flutter, intl

More

Packages that depend on pattern_formatter