Country class

The country Model that has all the country information needed from the country_picker

Constructors

Country({required String phoneCode, required String countryCode, required int e164Sc, required bool geographic, required int level, required String name, String? nameLocalized = '', required String example, required String displayName, required String displayNameNoCountryCode, required String e164Key, String? fullExampleWithPlusSign})
Country.from({required Map<String, dynamic> json})

Properties

countryCode String
The country code, ISO (alpha-2)
final
displayName String
Country name (country code) phone code
final
displayNameNoCountryCode String
Country name (country code)
final
displayNameNoE164Cc String
no setter
e164Key String
final
e164Sc int
final
example String
An example of a telephone number without the phone code
final
flagEmoji String
provides country flag as emoji. Can be displayed using
no setter
fullExampleWithPlusSign String?
An example of a telephone number with the phone code and plus sign
final
geographic bool
final
hashCode int
The hash code for this object.
no setteroverride
iswWorldWide bool
no setter
level int
final
name String
The country name in English
final
nameLocalized String?
The country name localized
getter/setter pair
phoneCode String
The country phone code
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

getTranslatedName(BuildContext context) String?
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
startsWith(String query, CountryLocalizations? localizations) bool
toJson() Map<String, dynamic>
toString() String
A string representation of this object.
override

Operators

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

Static Properties

worldWide Country
getter/setter pair

Static Methods

parse(String country) Country
tryParse(String country) Country?