Skip to content
pubscout

flutter_multi_formatter

2.13.11, released 6 months ago by softmaestri.com

Input formatters for international phone numbers, credit/debit cards, currencies, and custom masks.

WASM-ready
$ flutter pub add flutter_multi_formatter
Source repository

What it does

Provides a collection of Flutter text input formatters and utility methods to automatically format phone numbers, credit/debit cards, and currency values. It also includes validation helpers for phone numbers, Bitcoin wallets, and a widget to easily unfocus text fields.

AI-written summary of version 2.13.11, based on the package's README and metadata. Report an inaccuracy

Use it when

  • You need to format and validate phone numbers with country code detection.
  • You need to format credit or debit card input fields with card type detection.
  • You need to display and format currency values as users type.

Skip it when

  • You require complex state management solutions for your forms.
  • You are looking for a complete UI component library or form builder.

Strengths

  • Automated detection of phone numbers and credit card systems.
  • Includes helpful string extensions for currency and number formatting.
  • Provides a simple Unfocuser widget to dismiss keyboards.

Weaknesses

  • Card validation can return true only for supported card systems.
  • Relies on a predefined list of card systems and phone codes.

Setup

Kind
Flutter widgets
Effort
Low
Code generation
No
Direct dependencies
3

No complex native setup required. Simply import the package and add the desired formatters to your TextFormField inputFormatters list.

TextFormField(
    keyboardType: TextInputType.phone,
    inputFormatters: [
        PhoneInputFormatter()
    ],
)

Alternatives

Packages that do the same job and could replace flutter_multi_formatter.

Works with

Packages commonly used together with flutter_multi_formatter: ones it builds on, ones built on it, and its own family.