dart_countries
A set of informations about countries. Contains various maps and isoCodes.
Maps
You can use the maps to only import the information that you need
- countriesNameIsoCode.US
- countriesNativeNameIsoCode.FR // native name, eg: France
- countriesContinentIsoCode.ES // Europe
- countriesCapitalIsoCode.FR // Paris
- countriesCurrencyCodeIsoCode.US // USD
- countriesFlagIsoCode.US // unicode flag wont display on windows yet
- countriesLanguagesIsoCode.US //
'en'
- countriesCountryCodeIsoCode.FR // 33
Country class
Alternatively you can use the country class that contains all the info (less tree shaking).
countries.forEach((country) {
if (country.currencyCode == 'USD') print(country.name);
});
print(Country(IsoCode.US).currencyCode);