Country class
A class representing country-related information, including codes, currencies, flags, languages, names, nationalities, and phone codes.
Constructors
- Country.fromCode(String code, [String? languageCode])
-
Factory constructor to create a Country from a 2-letter country code.
Optionally specify a language code.
factory
Properties
- code → String
-
final
- codeInIso3 → String?
-
final
- currencyCode → String?
-
final
- currencyName → String?
-
final
- currencyNameInNative → String?
-
final
- currencySymbol → String?
-
final
- flag → String?
-
final
- hashCode → int
-
The hash code for this object.
no setteroverride
- languageCode → String?
-
final
- languageName → String?
-
final
- languageNameInNative → String?
-
final
- languageNumericalDigits → String?
-
final
- locale → String
-
Returns the locale representation of the country.
no setter
- name → String?
-
final
- nameInNative → String?
-
final
- nationality → String?
-
final
- nationalityInNative → String?
-
final
- phoneCode → String?
-
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
source
→ Map<
String, dynamic> -
Returns a
Mapof all fields for serialization or comparison.no setter
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
searchCountry(
String query) → bool - Search country by code or name.
-
searchCurrency(
String query) → bool - Search country by currency code or name.
-
searchLanguage(
String query) → bool - Search country by language code, name, or country name.
-
searchPhone(
String query) → bool - Search country by phone code, country code, or name.
-
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
override