country_selector_widget 0.0.1 copy "country_selector_widget: ^0.0.1" to clipboard
country_selector_widget: ^0.0.1 copied to clipboard

outdated

This Country Selector UI Library written by Dart and Fluter and supports three locales with country's name, achieves lazy loading, and country card animation on listview. This UI Library provides Coun [...]

Country Selector Widget #

This Country Selector Widget UI Library written by Dart and Fluter and supports three locales with country's name, achieves lazy loading, and country card animation on listview. This UI Library provides CountrySelectorWidget and showCountrySelectorBottomSheet to fulfill the needed usage.

Android iOS Linux macOS Web Windows
Support Any Any Any Any Any Any

Usage #

To use this plugin, add country_selector_widget as a [dependency in your pubspec.yaml file].

Examples #

Here are the examples that show you how to use the CountrySelectorWidget and showCountrySelectorBottomSheet.

Usage of CountrySelectorWidget

  • the default locale is SelectedLocale.en, you would change to SelectedLocale.zhCH or SelectedLocale.zhHK
  • once the country is selected and clicked the continue btn it will trigger the valueChangedCallback called onSelectedCountry and return the Country
CountrySelectorWidget(
    onSelectedCountry: (Country country) async {
        // selected country callback 
    },
),

Usage of showCountrySelectorBottomSheet

  • the different between CountrySelectorWidget and showCountrySelectorBottomSheet are showCountrySelectorBottomSheet is wrap with the showModalBottomSheet
  • showCountrySelectorBottomSheet will also do the Navigator.pop(context) for you once the continue button are clicked
showCountrySelectorBottomSheet(
    context: context,
    onSelectedCountry: (Country country) async {
        // selected country callback 
    };

Dmonstraction of CountrySelectorWidget #

"CountrySelectorWidget - SelectedLocale.zhCH"

Dmonstraction of showCountrySelectorBottomSheet #

"showCountrySelectorBottomSheet - SelectedLocale.en"

3
likes
0
pub points
1%
popularity

Publisher

unverified uploader

This Country Selector UI Library written by Dart and Fluter and supports three locales with country's name, achieves lazy loading, and country card animation on listview. This UI Library provides CountrySelectorWidget and showCountrySelectorBottomSheet to fulfill the needed usage.

Homepage

License

unknown (license)

Dependencies

flutter

More

Packages that depend on country_selector_widget