Package selection guidance compiled from public package information, community data, and project usage.
A Flutter package for handling international phone number input with built-in validation using the libphonenumber library. It provides a user-friendly interface to enter and format phone numbers according to country-specific standards, ensuring accurate data collection across global users. The package automatically detects the country based on input or a selected default, applies proper formatting, and validates the entered number in real time.
Use cases
Global user registration
International contact forms
Phone number verification workflows
Multi-region mobile applications
E-commerce checkout processes
Key features
Real-time phone number validation
Automatic country code detection
Formatted input with masking
Supports all major countries
Integration with libphonenumber
Suitable for
Apps targeting international audiences
Forms requiring valid phone numbers
Developers needing robust input validation
Projects using internationalization
Applications with compliance needs
Considerations
Requires internet for full country database lookup
May increase app size due to libphonenumber dependency
Limited customization of UI components
No offline validation support
Dependent on external library updates
Original README
Original README snapshot from the linked source repository. Visit the repository for the latest content.
Here is a list of properties available to customize the widget:
Name
Type
Description
initialPhoneNumber
String
used to set initial phone number
initialSelection
String
used to set initial country code
errorText
String
use this to set an error message
hintText
String
sets hint
labelText
String
sets label
errorStyle
TextStyle
style applied to error message
hintStyle
TextStyle
style applied to hint
labelStyle
TextStyle
style applied to label
errorMaxLines
int
the maximum number of lines user can type
enabledCountries
List
the list of enabled countries to display
decoration
InputDecoration
decoration applied to the TextField widget
showCountryCodes
bool
shows the country code (default true)
showCountryFlags
bool
shows. the country flags (default true)
dropdownIcon
Widget
use this to customize dropdown icon
Contributions
Contributions of any kind are more than welcome! Feel free to fork and improve international_phone_input in any way you want, make a pull request, or open an issue.