IntlCountryData class
Constructors
-
IntlCountryData({required String name, required String flag, required String codeAlpha2, required String telephoneCode, required Map<
String, String> nameTranslations, required int telephoneMinLength, required int telephoneMaxLength, Map<String, List< ? telephoneAreaCodes})int> > -
const
- IntlCountryData.fromCountryCodeAlpha2(String code)
-
Returns a country for a given 2 letter country code.
Throws a StateError if not found.
factory
Properties
- codeAlpha2 → String
-
2 letter country code (ISO 3166-1 alpha-2)
https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2
final
- flag → String
-
Flag emoji
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- name → String
-
Name (English)
final
-
nameTranslations
→ Map<
String, String> -
Translations of name in various languages
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
telephoneAreaCodes
→ Map<
String, List< ?int> > -
State/Province and list of area codes. Optional. This is useful to
determine country of a number in overlapping country eg: US & CA
final
- telephoneCode → String
-
Telephone number dial code
final
- telephoneMaxLength → int
-
Telephone number maximum length
final
- telephoneMinLength → int
-
Telephone number minimum length
final
Methods
-
localizedName(
String languageCode) → String -
matchingTelephoneAreaCode(
String number) → String? -
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
-
all(
) → List< IntlCountryData> - Returns all countries
-
fromTelephoneNumber(
String number) → List< IntlCountryData> - Returns countries that match this telephone number format
-
hasCountryCodeAlpha2(
String code) → bool