country_state_city
0.1.6, released 4 years ago by an unverified publisher
Display a list of world-wide countries, states, and cities depending on given country.
What it does
Provides asynchronous functions and models to fetch worldwide countries, states, and cities by ISO codes or names. It handles data structures for countries, states, cities, and time zones.
AI-written summary of version 0.1.6, based on the package's README and metadata. Report an inaccuracy
Use it when
- You need a picker or list of countries, states, and cities in your app.
- You need to filter states and cities based on a selected country's ISO code.
Skip it when
- You need offline-first local database persistence for user location changes.
- You require detailed interactive maps and geolocation features.
Strengths
- Easy to query countries, states, and cities by ISO codes.
- Supports multiple platforms including Android, iOS, Web, Windows, macOS, and Linux.
Weaknesses
- Limited to static lists of countries, states, and cities.
- Does not include UI picker widgets out of the box, only data/utilities.
Setup
- Kind
- Flutter widgets
- Effort
- Low
- Code generation
- No
- Direct dependencies
- 0
not documented
import 'package:country_state_city/country_state_city.dart';
final countries = await getAllCountries();
final states = await getStatesOfCountry('AF');Alternatives
Packages that do the same job and could replace country_state_city.
- countrify
Country, state, and city picker with 250 countries and phone input fields.
62Compare - country_state_city_picker
Flutter package to select countries, states, and cities using pickers.
58Compare - csc_picker_plus
Flutter widget to display and search countries, states, and cities worldwide.
43Compare - country_code_picker
A Flutter widget for showing a country code selector with search and favorites support.
69Compare