Skip to content

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

License

Notifications You must be signed in to change notification settings

JacobT14/flutter_pattern_formatter

 
 

Repository files navigation

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(),
  ],
)

About

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

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Dart 92.3%
  • Java 4.2%
  • Objective-C 3.5%