Skip to content

A customised Flutter TextFormField to input european VAT number of a specified County. Completely based on intl_phone_field package.

License

Notifications You must be signed in to change notification settings

gmaxferr/intl_eu_vat_field

 
 

Repository files navigation

International Phone Field Package

Pub

A customised Flutter TextFormField to input european VAT numbers validated according to EU Guidelines.

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

Screenshots

Installing

To use this package:

Run this command:

flutter pub add intl_eu_vat_field

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

dependencies:
  intl_eu_vat_field: ^1.0.2

How to Use

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

IntlVatNumberField(
    decoration: InputDecoration(
        labelText: 'VAT Number',
        border: OutlineInputBorder(
            borderSide: BorderSide(),
        ),
    ),
    initialCountryCode: 'PT',
    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.

CONTRIBUTORS

LICENSE

License: MIT

About

A customised Flutter TextFormField to input european VAT number of a specified County. Completely based on intl_phone_field package.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Dart 95.6%
  • HTML 3.0%
  • Other 1.4%