tp_country_pickers version: 3.0.5

Published 2026-08-29

n/a

sdk | dart flutter
repository | svn
platform | n/a
status | n/a
  • Readme
  • Changelog
  • Versions

taken from version: 3.0.1

copied due to outdated dependencies.

country_pickers

Countries, codes, flags and several way of picking them at your service...one widget away...

CountryPickerDropdown example
 CountryPickerDropdown(
            initialValue: 'AR',
            itemBuilder: _buildDropdownItem,
            itemFilter:  ['AR', 'DE', 'GB', 'CN'].contains(c.isoCode),
            priorityList:[
                    CountryPickerUtils.getCountryByIsoCode('GB'),
                    CountryPickerUtils.getCountryByIsoCode('CN'),
                  ],
            sortComparator: (Country a, Country b) => a.isoCode.compareTo(b.isoCode),
            onValuePicked: (Country country) {
              print("${country.name}");
            },
          )
 Widget _buildDropdownItem(Country country) => Container(
        child: Row(
          children: <Widget>[
            CountryPickerUtils.getDefaultFlagImage(country),
            SizedBox(
              width: 8.0,
            ),
            Text("+${country.phoneCode}(${country.isoCode})"),
          ],
        ),
      );
CountryPickerDialog example
void _openCountryPickerDialog() => showDialog(
        context: context,
        builder: (context) => Theme(
            data: Theme.of(context).copyWith(primaryColor: Colors.pink),
            child: CountryPickerDialog(
                titlePadding: EdgeInsets.all(8.0),
                searchCursorColor: Colors.pinkAccent,
                searchInputDecoration: InputDecoration(hintText: 'Search...'),
                isSearchable: true,
                title: Text('Select your phone code'),
                onValuePicked: (Country country) =>
                    setState(() => _selectedDialogCountry = country),
                itemFilter: (c) => ['AR', 'DE', 'GB', 'CN'].contains(c.isoCode),
                priorityList: [
                  CountryPickerUtils.getCountryByIsoCode('TR'),
                  CountryPickerUtils.getCountryByIsoCode('US'),
                 ],
                itemBuilder: _buildDialogItem)),
      );
CountryPickerCupertino example
 void _openCupertinoCountryPicker() => showCupertinoModalPopup<void>(
      context: context,
      builder: (BuildContext context) {
        return CountryPickerCupertino(
          pickerSheetHeight: 300.0,
          onValuePicked: (Country country) =>
              setState(() => _selectedCupertinoCountry = country),
          itemFilter: (c) => ['AR', 'DE', 'GB', 'CN'].contains(c.isoCode),
          priorityList: [
            CountryPickerUtils.getCountryByIsoCode('TR'),
            CountryPickerUtils.getCountryByIsoCode('US'),
          ],
        );
      });

Credits

Thanks goes to country-flags repo for the flag image assets.

[3.0.1] - 05/20/2024

3.0.5 - 2026-08-29

Changed

  • Version bump from 3.0.4 to 3.0.5 (flutter 3.47.2, dart 3.13.2, serverpod 3.4.13).

3.0.4 - 2026-08-25

Changed

  • Version bump from 3.0.3 to 3.0.4 (cupertino_ui -> 1.0.1 (was 1.0.0)).

3.0.3 - 2026-08-25

Changed

  • Version bump from 3.0.2 to 3.0.3 (material_ui -> 1.1.0 (was 1.0.1)).

3.0.2 - 2026-08-20

Changed

  • Version bump from 3.0.1 to 3.0.2 (material_ui -> 1.0.1 (was 1.0.0)).
  • Add Canary Islands by @tulioccalazans
  • Add flutter_lints and fix analysis warnings

[3.0.0] - 05/20/2024

  • Fix breaking changes comes with Flutter 3.22.0
  • Bump version to 3.0.0

[2.0.0] - 03/13/2021

  • Null-safety is added
  • Fix issue #40 (Country Code Not available for "Lao People's Democratic Republic") by @Tan-JamickoJohn
  • Fix issue #53 and #59 (Deprecated ButtonTheme.bar is removed) by @phamnhuvu-dev
  • Fix issue #45 (Search doesn't show all results) by @shadyshrif

Thanks @phamnhuvu-dev, @shadyshrif, @Tan-JamickoJohn

[1.3.0] - 05/26/2020

  • Fix issue #10 Thanks @ened

  • BREAKING CHANGE: CountryPickerDropdown has more customization fields. isDense defaults to false.

[1.2.1] - 04/25/2020

  • getCountryByName and getCountryByIso3Code is added to CountryPickerUtils class. PR #28 PR #29 Thanks @leynier

  • searchFilter property is added to CountryPickerDialog PR #30 Thanks @leynier

[1.2.0] - 03/14/2020

  • Add features(priority list and sort by field) requested in issue #14 Thanks @muarifer and @ziyan-junaideen

  • Add isExpanded property to CountryPickerDropdown PR #22 Thanks @Pradeepkn

  • Add popOnPick property to CountryPickerDialog PR 24 Thanks @crtl

[1.1.0] - 04/26/2019

  • Fix issue #12 - Fix background color setting for CountryPickerCupertino. Thanks @rhmoeller

  • Fix filtering issue for CountryPickerCupertino.

  • Fix Update for iPhone X UI issues with safe-area. PR #13 Thanks @dhavalagile

[1.0.4] - 04/14/2019

  • Fix issue #7 - Add iso3Code. Thanks @endigo

[1.0.3] - 04/12/2019

  • Fix issue #9 - Ability to filter countries. Thanks @ened

[1.0.2] - 03/27/2019

  • Fix issue #6 Thanks @rafe211
  • Fix documentation error. PR #3 Thanks @GeertJohan

[1.0.1] - 10/09/2018

  • CountryPickerDropdown's onValuePicked doesn't feel useless anymore. [Thanks Solomon Nsumei @solnsumei]

[1.0.0] - 9/22/2018

  • Initial release :tada:
  • CountryPickerDropdown
  • CountryPickerDialog
  • CountryPickerCupertino
  • Country flag image assets and list of maps which has country name, iso code, phone code.

3.0.5

2026-08-29 download