Leverages libphonenumber to allow for asynchronous and synchronous formatting of phone numbers in Flutter apps. Includes a TextInputFormatter to allow real-time AsYouType formatting.
MIT License
60
stars
73
forks
source link
Ability to recognize country when inserting a phone number #68
When code user provides autofillHints telephoneNumber iOS automatically suggests end user's phone from their contact card (Phone -> Contacts -> My Card)
In this case, the LibPhonenumberTextFormatter treats the prefix as part of the number and removes the ending. But it would be great if, when inserting, the country was automatically recognized and the appropriate mask was applied. You can see an example in this GIF
When code user provides autofillHints telephoneNumber iOS automatically suggests end user's phone from their contact card (Phone -> Contacts -> My Card)
In this case, the
LibPhonenumberTextFormatter
treats the prefix as part of the number and removes the ending. But it would be great if, when inserting, the country was automatically recognized and the appropriate mask was applied. You can see an example in this GIFFor these purposes I added dlibphonenumber package dependency. Which is a dart port of the google/libphonenumber original library