Skip to content
pubscout

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.

WASM-ready
$ flutter pub add phone_text_field
Source repository

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.