Countries class final

Query interface for the offline world countries dataset.

All methods return immutable Country value objects. Single-lookup methods return Country? (null when not found).

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

all() List<Country>
All 250 countries.
areaBiggerThan(double km2) List<Country>
Countries larger than km2 km².
areaSmallerThan(double km2) List<Country>
Countries smaller than km2 km².
bordersOf(String alpha3) List<Country>
Countries sharing a land border with the country identified by alpha3.
byAlpha3Code(String code) Country?
Country by ISO 3166-1 alpha-3 code (e.g. 'USA'). Returns null if not found.
byCapital(String capital) Country?
Country by capital city name. Returns null if not found.
byCode(String code) Country?
Country by ISO 3166-1 alpha-2 code (e.g. 'US'). Returns null if not found.
byDialCode(String code) Country?
Country by dial/calling code (e.g. '1' for +1). Returns null if not found.
byFlag(String flag) Country?
Country by flag emoji (e.g. '🇺🇸'). Returns null if not found.
byName(String name) Country?
Country by common name. Returns null if not found.
byNumericCode(String code) Country?
Country by ISO 3166-1 numeric code (e.g. '840'). Returns null if not found.
byRegion(Region region) List<Country>
Countries in region.
byTimeZone(TimeZone timeZone) List<Country>
Countries sharing the given timeZone offset.
currencies() List<Currency>
All unique currencies across all countries.
independent() List<Country>
All independent countries.
landlocked() List<Country>
All landlocked countries.
languages() List<Language>
All unique languages across all countries.
Case-insensitive search across name, nativeName, altSpellings, capital.
unMembers() List<Country>
All UN member countries.
withCurrency(String isoCode) List<Country>
Countries using isoCode currency (e.g. 'USD').
withDialCode(String prefix) List<Country>
Countries whose calling code starts with prefix (e.g. '1').
withLanguage(String isoCode) List<Country>
Countries with isoCode as an official language (ISO 639-3).