phone_number_formatter 1.0.2
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
initStateso validation badge and parsed results are available on frame 1 without workarounds. - Dial Code & Trunk Stripping: Automatically clean dial codes (
+880or880) and local trunk prefixes (0) from pre-filled controller strings. - Dynamic Controller Replacement: Added support for updating controllers via
didUpdateWidgetand proper listener cleanup ondispose.
1.0.1 - 2026-09-19 #
- Optimized
pubspec.yamlpackage description length for pub.dev Pana score. - Added explicit platform support and discoverability topics.
1.0.0 - 2026-09-19 #
🚀 Initial Release #
PhoneInputFieldWidget:- 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
TextInputFormatterfor smooth, dynamic formatting without cursor jumping. - Automatic leading trunk prefix stripping (
0) when dial codes are present. - Automatic maximum digit length enforcement (
enforceMaxLength).
- Real-time
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.