country_state_picker
0.1.2, released 8 months ago by acloe.com
Flutter country and state/region picker with searchable dropdowns.
What it does
A widget set that lets users select a country with emoji flags and its corresponding state or region via searchable dropdowns. It supports initial value pre-selection, custom country filtering, and form validation.
AI-written summary of version 0.1.2, based on the package's README and metadata. Report an inaccuracy
Use it when
- You need a user interface component for picking countries and states in a form.
- You want searchable dropdowns with built-in flag emojis.
- You need to restrict selectable countries to a specific whitelist.
Skip it when
- You also require city-level selection out of the box.
- You do not need country or state selection fields in your app.
Strengths
- Caches country data after the first load for performance.
- Supports country-only mode by hiding the state dropdown.
- Includes form validation and pre-selection capabilities.
Weaknesses
- City selection is currently not implemented (listed in Todo).
- Limited to country and state/region levels.
Setup
- Kind
- Flutter widgets
- Effort
- Low
- Code generation
- No
- Direct dependencies
- 0
CountryStatePicker(
onCountryChanged: (country) => setState(() => _country = country),
onStateChanged: (state) => setState(() => _state = state),
)Alternatives
Packages that do the same job and could replace country_state_picker.
- advanced_forms
Flutter form validation and state management with typed controllers and validators.
85Compare - direct_select_flutter
A selection widget with a full-screen modal popup for choosing options.
83Compare - world_countries
Compile-time sealed world data with country, currency, language, and phone pickers.
80Compare - countrify
Country, state, and city picker with 250 countries and phone input fields.
62Compare