intl_phone_field 1.4.2 copy "intl_phone_field: ^1.4.2" to clipboard
intl_phone_field: ^1.4.2 copied to clipboard

outdated

A customised Flutter TextFormField to input international phone number along with country code.

International Phone Field Package #

A customised Flutter TextFormField to input international phone number along with country code.

This widget can be used to make customised text field to take phone number input for any country along with an option to choose country code from a dropdown.

Screenshots #

Installing #

To use this package:

Add the following to your pubspec.yaml file:

dependencies:
  intl_phone_field: ^1.4.2

How to Use #

Simply create a IntlPhoneField widget, and pass the required params:z

IntlPhoneField(
    decoration: InputDecoration(
        labelText: 'Phone Number',
        border: OutlineInputBorder(
            borderSide: BorderSide(),
        ),
    ),
    initialCountryCode: 'IN',
    onChanged: (phone) {
        print(phone.completeNumber);
    },
)

Use initialCountryCode to set an initial Country Code.

Contributing #

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

CONTRIBUTORS #

LICENSE #

License: GPL v3

639
likes
0
pub points
99%
popularity

Publisher

verified publishervanshgoel.me

A customised Flutter TextFormField to input international phone number along with country code.

Repository (GitHub)
View/report issues

License

unknown (LICENSE)

Dependencies

flutter

More

Packages that depend on intl_phone_field