PhoneNumber class

PhoneNumber contains detailed information about a phone number

Constructors

PhoneNumber({String? phoneNumber, String? dialCode, String? isoCode})

Properties

dialCode String?
The Country dialCode of the phone number
final
hash int
Returns an integer generated after the object was initialised. Used to compare different instances of PhoneNumber
no setter
hashCode int
The hash code for this object.
no setterinherited
isoCode String?
Country isoCode of the phone number
final
phoneNumber String?
Either formatted or unformatted String of the phone number
final
props List<Object?>
The list of properties that will be used to determine whether two instances are equal.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
stringify bool?
If set to true, the toString method will be overridden to output this instance's props.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
parseNumber() String
Returns a String of phoneNumber without dialCode
toString() String
A string representation of this object.

Operators

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

Static Methods

getISO2CodeByPrefix(String prefix) String?
For predefined phone number returns Country's isoCode from the dial code, Returns null if not found.
getParsableNumber(PhoneNumber phoneNumber) Future<String>
Accepts a PhoneNumber object and returns a formatted phone number String
getPhoneNumberType(String phoneNumber, String isoCode) Future<PhoneNumberType>
Returns PhoneNumberType which is the type of phone number Accepts phoneNumber and isoCode and r
getRegionInfoFromPhoneNumber(String phoneNumber, [String isoCode = '']) Future<PhoneNumber>
Returns PhoneNumber which contains region information about the phoneNumber and isoCode passed.