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.
โ Valid length for Zimbabwe
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
flutter pub add country_phone_field
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.