Skip to main content

phone_number_formatter 1.0.2 copy "phone_number_formatter: ^1.0.2" to clipboard
phone_number_formatter: ^1.0.2 copied to clipboard

A lightweight Flutter package to format, parse, and validate international phone numbers for 240+ countries with customizable input field widget.

Changelog #

All notable changes to the phone_number_formatter package will be documented in this file.

1.0.2 - 2026-09-19 #

  • Initial Frame Validation: Evaluated initial input immediately during initState so validation badge and parsed results are available on frame 1 without workarounds.
  • Dial Code & Trunk Stripping: Automatically clean dial codes (+880 or 880) and local trunk prefixes (0) from pre-filled controller strings.
  • Dynamic Controller Replacement: Added support for updating controllers via didUpdateWidget and proper listener cleanup on dispose.

1.0.1 - 2026-09-19 #

  • Optimized pubspec.yaml package description length for pub.dev Pana score.
  • Added explicit platform support and discoverability topics.

1.0.0 - 2026-09-19 #

🚀 Initial Release #

  • PhoneInputField Widget:
    • Integrated country picker with flag emojis, country dial code selector, and instant search filter.
    • Live validation indicators with customizable colors (validBadgeColor, invalidBadgeColor) and icons (validBadgeIcon, invalidBadgeIcon).
    • Customizable decoration, keyboard action (textInputAction), read-only mode, and country filter (countryFilter).
  • PhoneNumberInputFormatter:
    • Real-time TextInputFormatter for smooth, dynamic formatting without cursor jumping.
    • Automatic leading trunk prefix stripping (0) when dial codes are present.
    • Automatic maximum digit length enforcement (enforceMaxLength).
  • PhoneNumberValidator & PhoneNumberParser:
    • Full support for 240+ countries and territories.
    • Specialized Bangladesh 11-digit national rule (01XXXXXXXXX) and 10-digit format after +880.
    • Flexible operator prefix checking by default (strictPrefix: false) to accept newly allocated operator series, with optional strict validation mode.
    • Standardized E.164 format output (+8801XXXXXXXXX) and clean digit representations.
  • Pure Dart & Zero Native Dependencies:
    • Fully compatible with iOS, Android, Web, macOS, Windows, and Linux.
1
likes
160
points
282
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

A lightweight Flutter package to format, parse, and validate international phone numbers for 240+ countries with customizable input field widget.

Repository (GitHub)
View/report issues

Topics

#phone-number #formatting #validation #country-code #input-field

License

MIT (license)

Dependencies

flutter

More

Packages that depend on phone_number_formatter