Skip to content
pubscout

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.

WASM-ready
$ flutter pub add country_state_city
Source repository

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.