country_picker_plus 2.0.2 copy "country_picker_plus: ^2.0.2" to clipboard
country_picker_plus: ^2.0.2 copied to clipboard

A flutter package to display list of Countries, States and Cities depends on Selected, also you can search country, state, and city all around the world.

Country Picker Plus 🌎 #

A flutter package to display list of Countries, States and Cities depends on Selected, also you can search country, state, and city all around the world.

Sample 1 Sample 2 Sample 3 Sample 4
image image image image

Getting Started #

STEP ONE: Please, add country_picker_plus to your package dependencies:

flutter pub add country_picker_plus

STEP TWO: Import the relevant package in the file you want to use:

import 'package:country_picker_plus/country_picker_plus.dart';

How to use #

The package has two methods that you can use according to your needs

  1. By using the main package, all three fields, which are the country, State, and City, are created by default, and you can design them as you wish.

Sample code for this section:

CountryPickerPlus(
   isRequired: true,
   countryLabel: "Country",
   countrySearchHintText: "Search Country",
   countryHintText: "Tap to Select Country",
   stateLabel: "State",
   stateHintText: "Tap to Select State",
   cityLabel: "City",
   cityHintText: "Tap to Select City",
   bottomSheetDecoration: bottomSheetDecoration,
   decoration: fieldDecoration,
   searchDecoration: searchDecoration,
   onCountrySaved: (value) {},
   onCountrySelected: (value) {},
   onStateSelected: (value) {},
   onCitySelected: (value) {},
),

Note: You can hide all fields until the previous field is selected

For Instance:

In the main package class. Use the following property

hideFields: true,
  1. Or use each of the fields individually [country,state,city]

Sample code for this section:

CountryPickerPlus.country(...);
CountryPickerPlus.state(country:'COUNTRY_NAME',....);
CountryPickerPlus.city(country:'COUNTRY_NAME',state:'STATE_NAME',...);

And and and other features that you can play with using code... :)

Additional information #

A Package Developed by Ali Hosseini

Please, report the bugs through the Github repository: https://github.com/real-ali/country_picker_plus/issues

6
likes
130
pub points
83%
popularity

Publisher

unverified uploader

A flutter package to display list of Countries, States and Cities depends on Selected, also you can search country, state, and city all around the world.

Repository (GitHub)
View/report issues

Documentation

API reference

License

BSD-3-Clause (LICENSE)

Dependencies

flutter, flutter_bloc

More

Packages that depend on country_picker_plus