flutter_country_selector
v1.0.19how a country picker to select a country
Package archive: https://pubdev.letsnova.ru/api/archives/flutter_country_selector/1.0.19.tar.gz
dart pub add flutter_country_selectorReadme
Flutter Country Selector
Country selector of the phone_form_field package exported in its own package.
Features
- localization: lots of supported languages
- semantics applied
Demo
Demo available here: https://cedvdb.github.io/flutter_country_selector/

Usage
Use CountrySelector.page if you need to show the selector inside a widget that is full screen. If you need to show the selector inside a modal of some sort, use CountrySelector.sheet instead.
Navigator.of(context).push(
MaterialPageRoute(
builder: (ctx) => CountrySelector.page(
onCountrySelected: (country) => Navigator.of(context).pop(country),
),
),
)
Localization
Dynamic localization
Use CountrySelectorLocalization.of(context)?.countryName(isoCode) when you need to dynamically localize the name of a country.
Supported languages
- ar
- de
- el
- en
- es
- fa
- fr
- he
- hi
- hu
- it
- ko
- ku
- nb
- nl
- pl
- pt
- ru
- sv
- tr
- uk
- ur
- uz
- vi
- zh
Setup
Example setup:
const MaterialApp(
locale: Locale('en'),
supportedLocales: [
Locale('en'),
],
localizationsDelegates: [
GlobalMaterialLocalizations.delegate,
CountrySelectorLocalization.delegate,
],
// ...
)
Overwriting or adding custom flags
Some users have expressed their need to change some flags due to political reasons, or stylistic reasons. You might also wish to add your own flags. To do so refer to this issue: https://github.com/cedvdb/phone_form_field/issues/222
Changelog
1.0.19
- Semantics fix for search field
1.0.18
- Add Polish localization
1.0.17+1
- Auto publish workflow implemented
1.0.17
- Fix a memory leak in the CountrySelectorBase widget
1.0.16
- Use theme default for
AppBarelevation.
1.0.15
- Added fix for Hebrew localization
1.0.14
- Add Catalan
1.0.13
- Add localizations for Urdu
1.0.12
- Fix translation in Vietnamese
- Add localizations for Hebrew
- Upgrade dependency
1.0.11
- Added localizations for vi
1.0.10
- Added localizations for Korean
1.0.9
- Fix translation in Portuguese
1.0.8
- Fix translation el
- Update readme
1.0.7
- Fix missing localizations
- Use newer version of circle_flags
- Add readme note about overwriting flags
1.0.6
- Added localizations for hu
- Fixed fr localizations
1.0.5
- Added missing localizations for pt and ru
- Upgraded phone_numbers_parser
1.0.4
- Improve accessibility
1.0.3
- Update demo gif
1.0.2
- Add
countryDialCodemethod toCountrySelectorLocalization
1.0.1
- Add demo gif
1.0.0
- Initial release
