phone_text_field
2.0.0, released a year ago by mohamed-abdo.com
Flutter plugin for international phone number input, validation, formatting, and country selection.
What it does
Provides a customized text field widget for entering and validating international phone numbers. Features automatic country detection, formatting based on standards, a search-enabled country picker dialog, and multi-language support.
AI-written summary of version 2.0.0, based on the package's README and metadata. Report an inaccuracy
Use it when
- You need to collect and validate international phone numbers in a Flutter form.
- Your app requires a country code picker with flags and search functionality.
- You want automatic phone number formatting as the user types.
Skip it when
- You only collect local phone numbers within a single country without formatting.
- You need custom non-phone text inputs.
Strengths
- Supports over 200 countries with specific validation rules and formatting.
- Includes localization support for English, Arabic, and French.
- Offers rich customization options for themes and country display formats.
Weaknesses
- Breaking changes introduced in v2.0.0 require migration steps for v1.x users.
- Limited to phone number inputs and cannot be used as a general-purpose text field.
Setup
- Kind
- Flutter widgets
- Effort
- Low
- Code generation
- No
- Direct dependencies
- 1
not documented
PhoneTextField(
onChanged: (phoneNumber) {
print('Complete number: ${phoneNumber.completeNumber}');
print('Country: ${phoneNumber.countryISOCode}');
},
)Alternatives
Packages that do the same job and could replace phone_text_field.
- phone_form_field
Flutter phone input FormField with internationalization, validation, and country selector.
87Compare - flutter_intl_phone_field
International phone number input with country picker, formatting, and validation for 250+ countries.
76Compare - form_builder_phone_field
International phone number input field for the flutter_form_builder package.
70Compare - intl_mobile_field
Customized Flutter TextFormField to input international mobile numbers with country codes.
73Compare