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 Methods

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
countryCodes() List<CountryDetails?>
A list of country data for every country
detailsForLocale([Locale? locale]) CountryDetails
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, alpha2Code, alpha3Code and dialCode
dialCode([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
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.
name({Locale? locale}) String?
Returns the exended name for the given locale or if not provided, device's locale.