CountryLocalizations class abstract

Callers can lookup localized country names with an instance of CountryLocalizations returned by CountryLocalizations.of(context).

Implementers

Constructors

CountryLocalizations(String locale)
Creates a new CountryLocalizations instance.

Properties

allCountries String
Get the localized text for "All countries"
no setter
allCountryNames Map<String, String>
Get all country names as a map
no setter
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
searchCountry String
Get the localized text for "Search country..."
no setter
selectCountry String
Get the localized text for "Select Country"
no setter
selectYourCountry String
Get the localized text for "Select your country"
no setter

Methods

getCountryName(String countryCode) String
Get country name by country code
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

getCountryNameSafe(BuildContext context, String countryCode) String
Safe way to get country name with fallback Returns localized name or country code if localization fails
of(BuildContext context) CountryLocalizations
Get the CountryLocalizations instance for the current context Returns fallback English localization if delegates are not configured

Constants

delegate → const LocalizationsDelegate<CountryLocalizations>
Localizations delegate for CountryLocalizations
localizationsDelegates → const List<LocalizationsDelegate>
A list of this localizations delegate along with the default localizations delegates.
supportedLocales → const List<Locale>
A list of this localizations delegate's supported locales.