CountryCode class
Constructors
-
CountryCode({required String name, required String flag, required String code, required String dialCode, required Map<
String, String> nameTranslations, required int minLength, required int maxLength}) -
const
- CountryCode.getCountryCodeByAlpha2({required String? countryAlpha2Code})
-
Retrieves a CountryCode object by its two-letter alpha-2 country code.
alpha-2 Examples: US, IN, its case-insensitive
its return US Code if code not found
factory
- CountryCode.getCountryCodeByDialCode({required String? dialCode})
-
Retrieves a CountryCode object by its dial code.
Dial Code Examples: +1, +91
its return US Code if code not found
factory
Properties
- code → String
-
final
- dialCode → String
-
final
- dialCodeWithoutPlusPrefix → String
-
no setter
- flag → String
-
final
- hashCode → int
-
The hash code for this object.
no setteroverride
- maxLength → int
-
final
- minLength → int
-
final
- name → String
-
final
-
nameTranslations
→ Map<
String, String> -
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
localizedName(
String languageCode) → String - Retrieves a localized country name.
-
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.
override
Static Properties
-
allCodes
→ List<
CountryCode> -
no setter