PhoneParser class Null safety

The phoneNumber can be of the sort: +33 6 86 57 90 14, 06 86 57 90 14, 6 86 57 90 14 For parsing phone numbers

Use fromNational when you know that a phone number is a national version (phone number input)

Use fromIsoCode over fromCountryCode as it is faster Use fromCountryCode over fromRaw as it is faster

Constructors

PhoneParser()

Properties

hashCode int
The hash code for this object. [...]
read-only, inherited
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
parseNational(String isoCode, String national) PhoneNumber
@Deprecated('use static method [PhoneNumber.fromNational] instead')
parseRaw(String phoneNumber) PhoneNumber
@Deprecated('use static method [PhoneNumber.fromRaw] instead')
parseWithCountryCode(String countryCode, String phoneNumber) PhoneNumber
@Deprecated('use static method [PhoneNumber.fromCountryCode] instead')
parseWithIsoCode(String isoCode, String phoneNumber) PhoneNumber
@Deprecated('use static method [PhoneNumber.fromIsoCode] instead')
toString() String
A string representation of this object. [...]
inherited

Operators

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

Static Methods

fromCountryCode(String countryCode, String phoneNumber) PhoneNumber
parses a phoneNumber given a countryCode [...]
fromIsoCode(String isoCode, String phoneNumber) PhoneNumber
parses a phoneNumber given an isoCode [...]
fromNational(String isoCode, String national) PhoneNumber
parses a national phone number given an iso code [...]
fromRaw(String phoneNumber) PhoneNumber
parses a phoneNumber given a countryCode [...]
validate(PhoneNumber phoneNumber, [PhoneNumberType? type]) bool
Validates a phone number using pattern mathing [...]