PhoneNumberToCarrierMapper class
A phone prefix mapper which provides carrier information related to a phone number.
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
-
getNameForNumber(
PhoneNumber number, Locale languageCode) → String - Gets the name of the carrier for the given phone number, in the language provided. As per getNameForValidNumber(PhoneNumber, Locale) but explicitly checks the validity of the number passed in.
-
getNameForValidNumber(
PhoneNumber number, Locale languageCode) → String - Returns a carrier name for the given phone number, in the language provided. The carrier name is the one the number was originally allocated to, however if the country supports mobile number portability the number might not belong to the returned carrier anymore. If no mapping is found an empty string is returned.
-
getSafeDisplayName(
PhoneNumber number, Locale languageCode) → String - Gets the name of the carrier for the given phone number only when it is 'safe' to display to users. A carrier name is considered safe if the number is valid and for a region that doesn't support mobile number portability.
-
isMobile(
PhoneNumberType numberType) → bool - Checks if the supplied number type supports carrier lookup.
-
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 Properties
- instance → PhoneNumberToCarrierMapper
-
no setter