{"id":15833793,"url":"https://github.com/itzmeanjan/countryio","last_synced_at":"2026-04-28T08:32:34.462Z","repository":{"id":56827388,"uuid":"188779131","full_name":"itzmeanjan/countryIO","owner":"itzmeanjan","description":"A simple country.io data parser, written with :heart: using Dart :)","archived":false,"fork":false,"pushed_at":"2019-05-29T14:54:27.000Z","size":209,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-10-06T13:42:23.605Z","etag":null,"topics":["country-codes","country-data","dart","json"],"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/itzmeanjan.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}},"created_at":"2019-05-27T05:51:43.000Z","updated_at":"2019-09-12T02:24:41.000Z","dependencies_parsed_at":"2022-09-20T22:54:41.816Z","dependency_job_id":null,"html_url":"https://github.com/itzmeanjan/countryIO","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/itzmeanjan%2FcountryIO","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/itzmeanjan%2FcountryIO/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/itzmeanjan%2FcountryIO/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/itzmeanjan%2FcountryIO/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/itzmeanjan","download_url":"https://codeload.github.com/itzmeanjan/countryIO/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246638011,"owners_count":20809722,"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","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":["country-codes","country-data","dart","json"],"created_at":"2024-10-05T13:42:24.340Z","updated_at":"2026-04-28T08:32:34.421Z","avatar_url":"https://github.com/itzmeanjan.png","language":"Dart","funding_links":[],"categories":[],"sub_categories":[],"readme":"# countryIO\nA simple country.io data parser, written with :heart: using Dart :)\n\nShow some :heart: by putting :star: :)\n\n**This plugin is readily available for [use](https://pub.dev/packages/country_io).** ... :running: ...\n\n## what does it do ?\nThis *Dart* package can be used to fetch country data from [country.io](http://country.io/), which includes *country iso2 code*, *country name*, *capital name*, *continent code*, *currency code* \u0026 *phone code*, which will be eventually stored in a json encoded file, whose path needs to be provided to `Generator` class constructor.\n\n##  how to use ?\nWell using this package for generating json encoded file, holding country data, is pretty much easy.\n\nSimply invoke `Generator` constructor with a valid path to target `data.json` file. Calling `Generator( ... ).generate()`, will start fetching data from country.io, then parsing data and json encoding data for storing in target file.\n\nThis function will return a `Future\u003cMap\u003cString, Map\u003cString, String\u003e\u003e\u003e`, an empty Map denotes failure, otherwise full parsed data set will be returned in form of Map.\n\nEvery key of this map will be an iso2 country code, helping to identify a certain country uniquely.\n```dart\n{\n     .\n     .\n     .\n     iso2:\n     {\n        'continent': continent ?? '',\n        'name': name ?? '',\n        'iso3': iso3 ?? '',\n        'capital': capital ?? '',\n        'phone': phone ?? '',\n        'currency': currency ?? '',\n      }\n     .\n     .\n     .\n   }\n```\nAnd value for a certain iso2 country code will be another `Map\u003cString, String\u003e`, holding detailed country info.\n\n```dart\nGenerator('./data.json')\n    .generate()\n    .then((result) =\u003e print(result.isNotEmpty ? 'Success' : 'Failed !!!'));\n```\n\nYes, it's that simple :wink:\n\n## courtesy\nCountry data is fetched from [country.io](http://country.io/data/), so they do deserve courtesy.\n\nFor **T\u0026C** of data utilization, you may be interested in taking a look at [country.io](http://country.io/)\n\nHoping, it helped you a bit (o_o)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fitzmeanjan%2Fcountryio","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fitzmeanjan%2Fcountryio","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fitzmeanjan%2Fcountryio/lists"}