country_picker
2.0.28, released 5 months ago by an unverified publisher
A Flutter widget to pick a country from a list with optional phone code and search.
WASM-ready
What it does
Provides a bottom‑sheet dialog that lists countries, supports searching, filtering, favorites, and localization. It returns a Country object when a user selects one.
AI-written summary of version 2.0.28, based on the package's README and metadata. Report an inaccuracy
Use it when
- You need a country selector in a form
- You want to display phone codes alongside country names
- You need to support multiple locales for country names
Skip it when
- You need a custom UI that differs significantly from the provided list
- You require advanced validation or integration with a state‑management solution
Strengths
- Easy to integrate with a single function call
- Supports localization and custom theming
- Offers filtering, exclusion, and favorite countries
- No external dependencies beyond Flutter
Weaknesses
- Limited to country selection only
- No built‑in form validation integration
- UI is fixed to a bottom‑sheet style
Setup
- Kind
- Flutter widgets
- Effort
- Low
- Code generation
- No
- Direct dependencies
- 2
Add dependency to pubspec and import package; no permissions or build_runner needed
showCountryPicker(
context: context,
showPhoneCode: true,
onSelect: (Country country) {
print('Selected: ${country.displayName}');
},
);Alternatives
Packages that do the same job and could replace country_picker.
- country_code_picker
Similar API, more mature, but may have different theming options
69Compare
Works with
Packages commonly used together with country_picker: ones it builds on, ones built on it, and its own family.