Country class Null safety

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
@Deprecated('The modern term is displayNameNoCountryCode. ' 'This feature was deprecated after v1.0.6.')read-only
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
read-only
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.
read-onlyoverride
iswWorldWide bool
read-only
level int
final
name String
The country name in English
final
nameLocalized String?
The country name localized
read / write
phoneCode String
The country phone code
final
runtimeType Type
A representation of the runtime type of the object.
read-onlyinherited

Methods

getTranslatedName(BuildContext context) String?
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent 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
read / write

Static Methods

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