Need help with flutter_pattern_formatter?
Click the “chat” button below for chat support from the developer who created it, or find similar developers for support.

About the developer

hnvn
136 Stars 37 Forks BSD 3-Clause "New" or "Revised" License 45 Commits 4 Opened issues

Description

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

Services available

!
?

Need anything else?

Contributors list

# 34,384
Maven
Dart
Objecti...
Flutter
39 commits

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

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.