{"id":29672964,"url":"https://github.com/paulpascal/country_state_city","last_synced_at":"2025-07-22T21:09:27.690Z","repository":{"id":57750206,"uuid":"525370252","full_name":"paulpascal/country_state_city","owner":"paulpascal","description":null,"archived":false,"fork":false,"pushed_at":"2024-07-12T11:59:05.000Z","size":2850,"stargazers_count":5,"open_issues_count":13,"forks_count":11,"subscribers_count":3,"default_branch":"develop","last_synced_at":"2024-07-12T13:48:22.831Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Dart","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/paulpascal.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":"AUTHORS","dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-08-16T12:29:42.000Z","updated_at":"2024-06-28T07:23:10.000Z","dependencies_parsed_at":"2023-10-05T09:10:21.924Z","dependency_job_id":"4837fed8-167e-4243-a151-f44581bd0f7d","html_url":"https://github.com/paulpascal/country_state_city","commit_stats":{"total_commits":9,"total_committers":1,"mean_commits":9.0,"dds":0.0,"last_synced_commit":"bebd4d92289789320483d4823665a1b8708c7612"},"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/paulpascal/country_state_city","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paulpascal%2Fcountry_state_city","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paulpascal%2Fcountry_state_city/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paulpascal%2Fcountry_state_city/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paulpascal%2Fcountry_state_city/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/paulpascal","download_url":"https://codeload.github.com/paulpascal/country_state_city/tar.gz/refs/heads/develop","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paulpascal%2Fcountry_state_city/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266573232,"owners_count":23950185,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-22T02:00:09.085Z","response_time":66,"last_error":null,"robots_txt_status":null,"robots_txt_updated_at":null,"robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-07-22T21:09:27.066Z","updated_at":"2025-07-22T21:09:27.660Z","avatar_url":"https://github.com/paulpascal.png","language":"Dart","funding_links":[],"categories":[],"sub_categories":[],"readme":"# country_state_city\n\n![version](https://img.shields.io/badge/version-0.1.3-blue.svg) ![version](https://img.shields.io/badge/NullSefety-True-brightgreen)\n\nA flutter package to display list of world wide Countries, States and Cities. It also allows to get a list of States and Cities depends on given country (by ISO CODE).\n\n## How to Use\n\nTo use this Package, add `country_state_city` as a [dependency in your pubspec.yaml](https://flutter.io/platform-plugins/).\n\n```dart\n// import country_state_city package\nimport 'package:country_state_city/country_state_city.dart';\n```\n\n```dart\n// Get all countries\nfinal countries = await getAllCountries();\n\n// Get all states that belongs to a country by country ISO CODE\nfinal states = await getStatesOfCountry('AF'); // Afghanistan\n```\n\n## APIs\n\n| Function                                                                  | Description                                                                                   |\n| ------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- |\n| `Future\u003cList\u003cCountry\u003e\u003e getAllCountries()`                                 | Get world wide countries list.                                                                |\n| `Future\u003cCountry?\u003e getCountryFromCode(String countryCode)`                 | Get country from its ISO CODE                                                                 |\n| `Future\u003cList\u003cState\u003e\u003e getAllStates()`                                      | Get world wide states list.                                                                   |\n| `Future\u003cList\u003cState\u003e\u003e getStatesOfCountry(String countryCode)`              | Get the list of states that belongs to a country by the country ISO CODE                      |\n| `Future\u003cState?\u003e getStateByCode(String countryCode, String stateCode,)`     | Get a state from its code and its belonging country code                                      |\n| `Future\u003cList\u003cCity\u003e\u003e getAllCities()`                                       | Get world wide cities list.                                                                   |\n| `Future\u003cList\u003cCity\u003e\u003e getStateCities(String countryCode, String stateCode)` | Get the list of states that belongs to a state by the state ISO CODE and the country ISO CODE |\n| `Future\u003cList\u003cCity\u003e\u003e getCountryCities(String countryCode)`                 | Get the list of cities that belongs to a country by the country ISO CODE                      |\n\n\n## Classes\n\n| Class    | Description                                                                                                             |\n| -------- | ----------------------------------------------------------------------------------------------------------------------- |\n| Country  | Handle country data such as: (_name_, _isoCode_, _phoneCode_, _flag_, _currency_, _latitude_, _longitude_, _timezones_) |\n| State    | Handle state data such as: (_name_, _countryCode_, _isoCode_, _latitude_, _longitude_)                                  |\n| City     | Handle city data such as: (_name_, _countryCode_, _stateCode_, _latitude_, _longitude_)                                 |\n| Timezone | Handle timezone data such as: (_name_, _gmtOffset_, _gmtOffsetName_, _abbreviation_, _tzName_)                          |\n\n### Special Thanks to\n\n- [Harpreet Singh](https://github.com/harpreetkhalsagtbit)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpaulpascal%2Fcountry_state_city","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpaulpascal%2Fcountry_state_city","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpaulpascal%2Fcountry_state_city/lists"}