Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/denixport/dart.country
Dart package for ISO 3166-1 country codes
https://github.com/denixport/dart.country
country-codes dart i18n iso3166-1
Last synced: about 3 hours ago
JSON representation
Dart package for ISO 3166-1 country codes
- Host: GitHub
- URL: https://github.com/denixport/dart.country
- Owner: denixport
- License: mit
- Created: 2019-04-06T16:43:42.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2024-09-01T17:50:51.000Z (3 months ago)
- Last Synced: 2024-09-01T18:18:55.103Z (3 months ago)
- Topics: country-codes, dart, i18n, iso3166-1
- Language: Dart
- Size: 56.6 KB
- Stars: 12
- Watchers: 2
- Forks: 8
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
List of ISO 3166-1 assigned country codes.
[![pub package](https://img.shields.io/pub/v/country_code.svg)](https://pub.dartlang.org/packages/country_code)
![License](https://img.shields.io/github/license/denixport/dart.country.svg)## Features
* [x] ISO 3166-1 alpha-2. alpha-3, and numeric country codes in enum-like class
* [x] Parsing of country codes from string
* [x] Support for [user-assigned code elements](https://en.wikipedia.org/wiki/ISO_3166-1#Reserved_and_user-assigned_code_elements)## Usage
```dart
import 'package:country_code/country_code.dart';var code = CountryCode.tryParse("US");
if (code == CountryCode.US) {
print(code.alpha2);
print(code.alpha3);
print(code.numeric);
}
```
[See more examples][examples]## Bugs and feature requests
Please file feature requests and bugs at the [issue tracker][tracker].
[examples]: https://github.com/denixport/dart.country/tree/master/example
[tracker]: https://github.com/denixport/dart.country/issues