CountryCodes class

Constructors

CountryCodes()

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 Properties

allCountries List<Country>
no setter

Static Methods

addCountries({required List<Country> newCountries}) → void
Adds given country to Countries.countries for further usage
allAlpha2() List<String?>
A list of alpha 2 codes for every country
allAlpha3() List<String?>
A list of alpha 3 codes for every country
allDS() List<String?>
A list of DS codes for every country
allFIFA() List<String?>
A list of FIFA codes for every country
allGAUL() List<String?>
A list of GAUL codes for every country
allGEC() List<String?>
A list of GEC codes for every country
allIOC() List<String?>
A list of IOC codes for every country
allITU() List<String?>
A list of ITU codes for every country
allMARC() List<String?>
A list of MARC codes for every country
allWMO() List<String?>
A list of WMO codes for every country
alpha2Code({Locale? locale}) String?
Returns the ISO 3166-1 alpha2Code for the given locale. If not provided, device's locale will be used instead. You can read more about ISO 3166-1 codes here
alpha3Code({Locale? locale}) String?
Returns the ISO 3166-1 alpha3code for the given locale. If not provided, device's locale will be used instead. You can read more about ISO 3166-1 codes here
countries() List<Country?>
A list of country data for every country
detailsFromAlpha({String? alpha2, String? alpha3}) Country?
detailsFromLocale({Locale? locale}) Country
Returns the CountryDetails for the given locale. If not provided, the device's locale will be used instead. Have in mind that this is different than specifying supportedLocales on your app. Exposed properties are the name, 'a2', 'a3', 'num', 'itu', 'gec', 'ioc', 'fifa', 'ds', 'wmo', 'gaul', 'marc', 'dial' and 'independent'
dialCodeFromAlpha({String? alpha2, String? alpha3}) String?
dialCodeFromLocale({Locale? locale}) String?
Returns the dialCode for the given locale or device's locale, if not provided.
dialNumbers() List<String?>
A list of dial codes for every country
dsFromAlpha({String? alpha2, String? alpha3}) String?
dsFromLocale({Locale? locale}) String?
Returns the DS code for the given locale or if not provided, device's locale or from alpha code.
fifaFromAlpha({String? alpha2, String? alpha3}) String?
fifaFromLocale({Locale? locale}) String?
Returns the 'fifa' code for the given locale or if not provided, device's locale or from alpha code.
gaulFromAlpha({String? alpha2, String? alpha3}) String?
gaulFromLocale({Locale? locale}) String?
Returns the GAUL code for the given locale or if not provided, device's locale or from alpha code.
gecFromAlpha({String? alpha2, String? alpha3}) String?
gecFromLocale({Locale? locale}) String?
Returns the GEC code for the given locale or if not provided, device's locale or from alpha code.
getDeviceLocale() Locale?
Returns the current device's Locale Eg. Locale('en','US')
init({Locale? appLocale}) Future<bool>
Inits the underlying plugin channel and fetch current's device locale to be ready to use synchronously when required.
iocFromAlpha({String? alpha2, String? alpha3}) String?
iocFromLocale({Locale? locale}) String?
Returns the IOC code for the given locale or if not provided, device's locale or from alpha code.
ituFromAlpha({String? alpha2, String? alpha3}) String?
ituFromLocale({Locale? locale}) String?
Returns the ITU code for the given locale or if not provided, device's locale or from alpha code.
marcFromAlpha({String? alpha2, String? alpha3}) String?
marcFromLocale({Locale? locale}) String?
Returns the MARC code for the given locale or if not provided, device's locale or from alpha code.
nameFromAlpha({String? alpha2, String? alpha3}) String?
nameFromLocale({Locale? locale}) String?
Returns the extended name for the given locale or if not provided, device's locale or from alpha code.
numbers() List<String?>
A list of numeric codes for every country
numericFromAlpha({String? alpha2, String? alpha3}) String?
numericFromLocale({Locale? locale}) String?
Returns the numeric code for the given locale or if not provided, device's locale or from alpha code.
wmoFromAlpha({String? alpha2, String? alpha3}) String?
wmoFromLocale({Locale? locale}) String?
Returns the WMO code for the given locale or if not provided, device's locale or from alpha code.