dart_countries
Dart const countries maps containing information relative to a country.
Maps
You can use the maps to only import the information that you need
- countriesNameIsoCode.US
- countriesNativeIsoCode.US // native name
- countriesContinentIsoCode.US
- countriesCapitalIsoCode.US
- countriesCurrencyIsoCode.US
- countriesFlagIsoCode.US // unicode flag wont display on windows yet
- countriesLanguagesIsoCode.US
- countriesDialcodeIsoCode.US
- countriesPhonenumberlengthsIsoCode.US
- countriesPhoneDescriptionIsoCode.US
Country class
Alternatively you can use the country class that contains all the info.
countries.forEach((country) {
if (country.currencyCode == 'USD') print(country.name);
});
print(Country(IsoCode.US).currencyCode);