pattern_formatter 1.0.1
pattern_formatter: ^1.0.1 copied to clipboard

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

PatternFormatter #

pub package

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(),
  ],
)
97
likes
100
pub points
95%
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