PhoneNumberUtil class

A wrapper class PhoneNumberUtil that basically switch between plugin available for Web or Android or IOS and Other platforms when available.

Constructors

PhoneNumberUtil()

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

formatAsYouType({required String phoneNumber, required String isoCode}) Future<String?>
formatAsYouType uses Google's libphonenumber input format as you type. Accepts phoneNumber and isoCode Returns Future<String>
getNameForNumber({required String phoneNumber, required String isoCode}) Future<String?>
Accepts phoneNumber and isoCode Returns Future<String>
getNumberType({required String phoneNumber, required String isoCode}) Future<PhoneNumberType>
Accepts phoneNumber and isoCode Returns Future<PhoneNumberType> type of phone number
getRegionInfo({required String phoneNumber, required String isoCode}) Future<RegionInfo>
Accepts phoneNumber and isoCode Returns Future<RegionInfo> of all information available about the phoneNumber
isValidNumber({required String phoneNumber, required String isoCode}) Future<bool?>
isValidNumber checks if a phoneNumber is valid. Accepts phoneNumber and isoCode Returns Future<bool>.
normalizePhoneNumber({required String phoneNumber, required String isoCode}) Future<String?>
normalizePhoneNumber normalizes a string of characters representing a phone number Accepts phoneNumber and isoCode Returns Future<String>