PhoneParser class abstract
Parses a phone number given caller or destination information.
The logic is:
- Remove the international prefix / exit code a. if caller is provided remove the international prefix / exit code b. if caller is not provided be a best guess is done with a possible destination country
- Find destination country a. if no destination country was provided, the destination is assumed to be the same as the caller b. if no caller was provided a best guess is estimated by looking at the first digits to see if they match a country. Since multiple countries share the same country code, pattern matching might be used when there are multiple matches.
- Extract the country code with the country information
- Transform a local NSN to an international version
Constructors
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
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
-
parse(
String phoneNumber, {IsoCode? callerCountry, IsoCode? destinationCountry}) → PhoneNumber