We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c39d442 commit 261b9f3Copy full SHA for 261b9f3
lib/src/country_codes.dart
@@ -85,9 +85,7 @@ class CountryCodes {
85
86
/// Returns the `CountryDetails` for the given country alpha2 code.
87
static CountryDetails detailsFromAlpha2(String alpha2) {
88
- return CountryDetails.fromMap(codes.entries
89
- .where((entry) => entry["alpha2Code"] == alpha2)
90
- .single);
+ return CountryDetails.fromMap(codes.entries.where((entry) => entry.key == alpha2).single);
91
}
92
93
0 commit comments