Country Phone Field
Flutter package 0.3.0

Phone input,
worldwide.

A country picker and phone number field for Flutter. Give people a familiar way to enter their number, then read it in international format.

Field playgroundInteractive preview

โœ“ Valid length for Zimbabwe

International output+263771234567
ZW / ZimbabweE.164

Choose a country

QUICKSTART

Add it to your app.

Install the package, then place the field inside your Material or Cupertino app. Adaptive design follows the surrounding app automatically.

Requires Flutter 3.47 or later
Tested with Flutter 3.50.1 ยท Dart 3.14.0

Terminal
flutter pub add country_phone_field
Inside your widget tree
import 'package:country_phone_field/country_phone_field.dart';

PhoneNumberField(
  initialCountry: Countries.zimbabwe,
  design: PhoneFieldDesign.adaptive,
  onChanged: (phone) => debugPrint(phone.completeNumber),
)

Working with phone numbers

What does the field return?

Each callback provides the selected country, national digits, and the complete international number. Use phone.completeNumber for storage and phone.country.isoCode when you need the region.

How does validation work?

The built-in check compares the national digit count with the selected countryโ€™s length rules. Add a custom validator for your own requirements.

Can I customize the design?

Choose PhoneFieldDesign.material or PhoneFieldDesign.cupertino to override adaptive styling. Configure favorite countries, localize labels, or supply a custom picker.

Read the full package guide