Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added country name to every country code. #6

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
## [1.2.0]
- Added country name to every standard CountryCode.

## [1.1.0]
Minimal Dart SDK version requirement is v3.5

Expand Down
5 changes: 2 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,8 @@ if (code == CountryCode.US) {
print(code.alpha2);
print(code.alpha3);
print(code.numeric);
}
```
[See more examples][examples]
print(code.name);
}ples][

## Bugs and feature requests

Expand Down
30 changes: 27 additions & 3 deletions analysis_options.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,31 @@ analyzer:

linter:
rules:
constant_identifier_names: false
always_declare_return_types : true
avoid_null_checks_in_equality_operators : true
avoid_unused_constructor_parameters: true
cancel_subscriptions: true
package_api_docs: true
await_only_futures : true
camel_case_types : true
cancel_subscriptions : true
comment_references : true
constant_identifier_names: false
control_flow_in_finally : true
directives_ordering : true
empty_catches : true
empty_statements : true
hash_and_equals : true
implementation_imports : true
library_names : true
library_prefixes : true
non_constant_identifier_names : true
overridden_fields : true
package_api_docs : true
prefer_collection_literals : true
prefer_final_fields : true
public_member_api_docs : true
test_types_in_equals : true
throw_in_finally : true
type_init_formals : true
unrelated_type_equality_checks : true
constant_identifier_names : false

1 change: 1 addition & 0 deletions example/example.dart
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ void main() {
print(CountryCode.US.alpha3); // -> USA
print(CountryCode.US.numeric); // -> 840
print(CountryCode.US.symbol); // -> 🇺🇸
print(CountryCode.US.countryName); // -> United States of America

// The list of ISO-assigned codes are in CountryCode.values
var list = CountryCode.values.map<String>((c) => c.alpha2).join(', ');
Expand Down
Loading