Country class
Holds country related data for phone numbers.
Constructors
- Country(String name, String code, int prefix, LengthRule length)
Properties
- code → String
-
Country 2 char alpha code
final
- hashCode → int
-
The hash code for this object.
no setteroverride
- length → LengthRule
-
Length rule for national number
final
- name → String
-
Country name
final
- prefix → int
-
Country calling prefix code
final
- prefixLength → int
-
Length of the prefix
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
isValidNationalNumber(
String nationalNumber) → bool -
Validates given
nationalNumber
using defined length rule. -
isValidNumber(
String normalizedNumber) → bool -
Checks whether or not given
normalizedNumber
is valid phone number in this country. -
matches(
String normalizedNumber) → bool -
Does given
normalizedNumber
matches this country. -
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