intl_phone_input: Flutter phone field with formatting, country detection and validation
The article presents intl_phone_input, a Flutter package offering a phone number field with a country picker, designed as a maintained alternative to intl_phone_field. The widget wraps a TextFormField so it works with Form validation, controllers, focus nodes and autofill, and it formats numbers as users type while keeping the cursor stable. It detects pasted or typed international numbers and switches the country automatically, distinguishing shared dial codes such as +1 and +44 by their leading digits. Validation relies on libphonenumber metadata, allowing developers to restrict accepted number types, such as mobile only. The package also includes a searchable, localized country picker supporting English, French and Arabic, plus RTL layout and accessibility labels.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.

Discussion (0)
Log in to join the discussion and vote.
Log in