intl_phone_field_v2 4.0.2 copy "intl_phone_field_v2: ^4.0.2" to clipboard
intl_phone_field_v2: ^4.0.2 copied to clipboard

A customised Flutter TextFormField to input international phone number along with country code, flag, dial code, validation and currency information.

International Phone Field Package #

Note

intl_phone_field_v2 is an extension of intl_phone_field. This package has solved all the version related issues and added some new features. The original package is no longer maintained, so we have created this fork to continue its development. For more details about extra features to this package. Please check the CHANGELOG for more details.

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. You can also get the currency name and symbol for the selected country.

Screenshots #

Installing #

To use this package:

Run this command:

dart pub add intl_phone_field_v2

Or, add the following to your pubspec.yaml file:

dependencies:
  intl_phone_field_v2: ^<latest_version>

Sometimes you may want to use the latest version of the package, instead of a published version. To do that, use the git syntax:

dependencies:
  intl_phone_field_v2:
    git:
      url: git://github.com/sabikrahat/intl_phone_field_v2.git
      ref: main

How to Use #

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

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.

Comment on Issue or Pull Request, asking @all-contributors to add a contributor:

@all-contributors please add @<username> for <contributions>

<contributions>: See the Emoji Key (Contribution Types Reference) for a list of valid contribution types.

Maintainers #

Contributors #

Md. Sabik Alam Rahat
Md. Sabik Alam Rahat

💻 📖
Vansh Goel
Vansh Goel

💻
KNO3
KNO3

💻
Ling Li
Ling Li

💻
Anggara Putra Pratama
Anggara Putra Pratama

💻
JJ Geewax
JJ Geewax

💻
Keval Prajapati
Keval Prajapati

💻
hans.huang
hans.huang

💻 📖
Gregor Weber
Gregor Weber

💻
Ooi Han Yi
Ooi Han Yi

💻
Jimmy Forrester-Fellowes
Jimmy Forrester-Fellowes

💻

LICENSE #

This project is licensed under the MIT license. See LICENSE for more information.

0
likes
145
points
115
downloads

Publisher

verified publisheralgoramming.com

Weekly Downloads

A customised Flutter TextFormField to input international phone number along with country code, flag, dial code, validation and currency information.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

flutter

More

Packages that depend on intl_phone_field_v2