LokotroCountry class

Complete country data with codes and prefixes

Constructors

LokotroCountry({required LokotroRefCountry refCountry, required List<LokotroCountryCode> countryCodes, required List<LokotroPhonePrefix> phoneNumberPrefixes})
const
LokotroCountry.fromJson(Map<String, dynamic> json)
factory

Properties

countryCodes List<LokotroCountryCode>
final
displayName String
Get display name with flag and code
no setter
flag String
Get country flag emoji
no setter
hashCode int
The hash code for this object.
no setterinherited
maxPhoneChars int
Get max phone number characters
no setter
minPhoneChars int
Get min phone number characters
no setter
name String
Get country name
no setter
phoneNumberPrefixes List<LokotroPhonePrefix>
final
primaryCountryCode String
Get the primary country code (first one)
no setter
refCountry LokotroRefCountry
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
validPrefixes List<String>
Get all valid prefixes as strings
no setter

Methods

getMatchingPrefix(String phoneNumber) String?
Get the matching prefix for a phone number
hasValidPrefix(String phoneNumber) bool
Check if a phone number starts with a valid prefix
isValidPhoneLength(String phoneNumber) bool
Validate phone number length (excluding country code)
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Map<String, dynamic>
toString() String
A string representation of this object.
inherited
validatePhoneNumber(String phoneNumber, {required String invalidPrefixMessage, required String tooShortMessage, required String tooLongMessage}) String?
Full phone number validation

Operators

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