currency_country_picker 1.2.3 copy "currency_country_picker: ^1.2.3" to clipboard
currency_country_picker: ^1.2.3 copied to clipboard

A flutter package to select country with phone code and currency.

Country & Currency picker #

pub package

A flutter package to select a currency and country from a list with 250 countries.

Getting Started #

Add the package to your pubspec.yaml:

currency_country_picker: ^1.2.3

In your dart file, import the library:

import 'package:currency_country_picker/currency_country_picker.dart';

Show country picker using showCountryPickerFullScreen:

showCountryPickerFullScreen(
   context: context,
   showFlag: true,
   onSelect: (Country country) {
      print('Select country: ${country.phoneCode}');
   },
);

Parameters: #

  • onSelect: Called when a country is select. The country picker passes the new value to the callback (required)
  • showFlag: Shows flag for each country. Default value true.
  • countryFilter: Can be used to filter the Country list.
  • favorites: Show the favorite countries at the top of the list.
     showCountryPickerFullScreen(
        context: context,
        onSelect: (Country country) {
           print('Select country: ${country.phoneCode}');
        },
        countryFilter: <String>['+93', '+358','+355'],
     );
    
  • theme: Set a CountryPickerThemeData to the country picker to customize it. (optional).
     showCountryPickerFullScreen(
          context: context,
          theme: CountryPickerThemeData(
          countryCodeTextStyle: const TextStyle(
              color: Color.fromARGB(255, 168, 36, 60),
              fontSize: 17,
          ),
          titleTextStyle: const TextStyle(
              fontSize: 18,
              color:Colors.white,
          ),
          flagSize: 25,
          backgroundColor: Colors.black,
      ),
       onSelect: (Country country) => print('Select country: ${country.phoneCode}'),
     );
    

Contributions #

Contributions of any kind are more than welcome! Feel free to fork and improve currency_country_picker in any way you want, make a pull request, or open an issue.

3
likes
145
points
45
downloads

Publisher

verified publisherehsanabaci.ir

Weekly Downloads

A flutter package to select country with phone code and currency.

Homepage
Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

cupertino_icons, flutter

More

Packages that depend on currency_country_picker