PhoneParser class

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.
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

fromCountryCode(String countryCode, String phoneNumber) PhoneNumber
parses a phoneNumber given a countryCode
fromIsoCode(IsoCode isoCode, String phoneNumber) PhoneNumber
parses a phoneNumber given an isoCode
fromNational(IsoCode 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