pattern_formatter 1.0.2

Flutter Android iOS web

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(),
  ],
)
20
likes
100
pub points
92%
popularity

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

Repository (GitHub)
View/report issues

Documentation

API reference

Uploader

hunghd.yb@gmail.com

License

BSD (LICENSE)

Dependencies

flutter, intl

More

Packages that depend on pattern_formatter