NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
pub.dev · #660 most downloaded on pub.dev
Dart library for parsing phone numbers. Inspired by Google's libphonenumber and PhoneNumberKit for ios.
Last release 4 days ago
04 Oct 2026
Ships on a steady schedule
a new release about every 4 weeks
Most releases are documented
notes for 53 of the last 60 stable releases
1 version withdrawn
withdrawn after publishing
6 years old
70 releases · first in 2021
Rename the generated metadataLenghtsByIsoCode map to metadataLengthsByIsoCode (the misspelled name is kept as a deprecated alias).
$10, $11, ...) being corrupted when a
national number is transformed (a $10 reference used to be partially
replaced by the $1 reference).PhoneNumberException with Code.inputIsTooLong when a phone number
contains more digits than the maximum supported length (country calling code
plus national significant number).PhoneNumberException with Code.invalid instead of Code.notFound
when a phone number contains no digit at all.metadataLenghtsByIsoCode map to
metadataLengthsByIsoCode (the misspelled name is kept as a deprecated alias).Constants.slashSeparatedDates.Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
One column per quarter.
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
- Upgrade metadata
Nothing published for this version
- Upgrade metadata
Fix format for argentinian phone number
Fix wrong format for some countries
Added a format parameter to choose between international and national format
added support for remaining phoneNumberTypes (thanks @cottonman132 )
- update metadata
- add demo link in readme
Removed MinMaxUtils that was unused internally. While exported publically it was undocumented.
MinMaxUtils that was unused internally. While exported publically it was undocumented.deprectate getFormattedNsn in favor of formatNsn
getFormattedNsn in favor of formatNsnlower meta dependency version for flutter compat
- updated metadata
fix for local phone numbers not parsing accurately (issue 46)
remove dependency on dart_countries and phone_number_metadata and instead work as a monorepo for easier contribution.
Changed behavior to not remove the country code from an incomplete phone number that did not start with an exit code.
Fix issue where international phone numbers would be transformed as if those were local ones.
This major introduces a more accurate parsing logic taking into account caller and destination country.
This major introduces a more accurate parsing logic taking into account caller and destination country.
parse method which takes as parameters callerCountry and destinationCountryPhoneNumber in favor of parse, see readmevalidate and validateWithLength to isValid and isValidateLengthNothing published for this version
please use 6.0.0 or upgrade to 7.0.0, this is a faulty version.
[Breaking]: removed fromMap, toMap which have been replaced by fromJson(Map), toJson respectively.
- improved readme
- improved readme - upgraded deps
- updated metadata
[Breaking] all iso code api now use IsoCode enum
make phone number json serializable
Fix incorrect parsing in some cases
only modify national number to its international version when it is valid
reexport deprecated public api for backward comp
[Deprecated]: PhoneParser methods have been deprecated in favor of the methods on PhoneNumber class
This release removes the LightPhoneParser because it was not working perfectly and the cost of maintaining two parsers is too high.
Removing that parser allowed to revert to a more succint public API, where methods should be accessed solely via the PhoneNumber class.
PhoneParser, PhoneNumberFormatter and the likes are still exported for backward compatibility but it is advised to switch to PhoneNumber's methods instead
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
fix formatter error when empty input
- added [parseNational]
added localized formatter to format a phone number in an human readable way
rename base class for parsers to BasePhoneParser, as parser was too broad.
Resolve issue #1 where it was possible to significantly increase memory foothprint by importing both parsers. Thanks @xvrh
- Minor doc change
Added metadata property runtime type to toString to make it more obvious when two instances are not equals
- Made toString more readable
- Add toString to PhoneNumber
- validate method on PhoneNumber
With this change a few breaking changes had to be made
There are now two parsers:
With this change a few breaking changes had to be made
[Breaking]: PhoneNumber creation is now made with parsers:
before:
final frPhone = PhoneNumber.fromRaw('+33 655 5705 76');
final frPhone1 = PhoneNumber.fromIsoCode('FR', '655 5705 76');
after:
final frPhone = PhoneParser.fromRaw('+33 655 5705 76')
final frPhone1 = LightPhoneParser.fromIsoCode('FR', '655 5705 76');
[Breaking]: removed country class and country list, which are now in a separate library
extracted country data files to another library dart_countries as it can be used in other scenarios
Your coding agent can read these notes before it upgrades. Set up the MCP server →