PhoneNumber class Null safety

PhoneNumber contains detailed information about a phone number

Inheritance

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
read-only
hashCode int
The hash code for this object. [...]
read-only, inherited
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.
read-only, override
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited
stringify bool?
If set to true, the toString method will be overridden to output this instance's props. [...]
read-only, inherited

Methods

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

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.