Skip to content
pubscout

intl_phone_number_field

0.2.1, released 2 years ago by flutterway.net

Customised Flutter TextFormField to input international phone numbers with country codes.

WASM-ready
$ flutter pub add intl_phone_number_field
Source repository

What it does

Provides a customized text form field widget specifically designed for international phone number input. It includes a country code selector dialog, input masking, validation support, and customizable UI configurations.

AI-written summary of version 0.2.1, based on the package's README and metadata. Report an inaccuracy

Use it when

  • You need user registration or profile forms that require international phone numbers.
  • You want built-in country code selection and phone number formatting.

Skip it when

  • You only require basic standard text fields without phone formatting or country codes.

Strengths

  • Includes customizable dialog and country code configurations.
  • Supports custom JSON loading for country data.
  • Provides built-in validation and masking options.

Weaknesses

  • Limited documentation on advanced phone number parsing verification.
  • Relies on specific third-party dependencies for formatting and flags.

Setup

Kind
Flutter widgets
Effort
Low
Code generation
Yes (build_runner)
Direct dependencies
3
InternationalPhoneNumberInput(
  onInputChanged: (phone) {
    print(phone.number);
  },
  validator: (number) {
    if (number.number.isEmpty) {
      return "The phone number cannot be left empty";
    }
    return null;
  },
)

Alternatives

Packages that do the same job and could replace intl_phone_number_field.

Works with

Packages commonly used together with intl_phone_number_field: ones it builds on, ones built on it, and its own family.