country_state_city 0.1.6 copy "country_state_city: ^0.1.6" to clipboard
country_state_city: ^0.1.6 copied to clipboard

A flutter package to display list of Countries, States and Cities depends on a given country

example/lib/main.dart

// ignore_for_file: unused_local_variable

import 'package:country_state_city/country_state_city.dart';

void main() async {
  // Get all countries
  final countries = await getAllCountries();
  // Get all states
  final states = await getAllStates();
  // Get all cities
  final cities = await getAllCities();

  // Get a country
  final country = await getCountryFromCode('AF');
  if (country != null) {
    final countryStates = await getStatesOfCountry(country.isoCode);

    final countryCitis = await getCountryCities(country.isoCode);
  }
}
23
likes
160
pub points
94%
popularity

Publisher

unverified uploader

A flutter package to display list of Countries, States and Cities depends on a given country

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (LICENSE)

Dependencies

flutter

More

Packages that depend on country_state_city