PhoneNumber class

Constructors

PhoneNumber(Country? country, String? nationalNumber)
Create PhoneNumber instance using given country and nationalNumber
factory
PhoneNumber.countryCode(String countryCode, String nationalNumber)
Create PhoneNumber instance using country found by given countryCode and nationalNumber
factory
PhoneNumber.isoCode(String isoCode, String nationalNumber)
Create PhoneNumber instance using country found by given isoCode and nationalNumber
factory
PhoneNumber.parse(String value)
Parse given value into PhoneNumber instance
factory

Properties

country Country?
Phone number country
final
formattedNumber String
E.164 formatted phone number
final
hashCode int
The hash code for this object.
no setterinherited
isValid bool
Stores whether or not the phone number is valid
final
nationalNumber String
National number part of the phone number
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

clone() PhoneNumber
Create exact same clone of this PhoneNumber instance.
copyWith({Country? country, String? nationalNumber, String? formattedNumber, bool? isValid}) PhoneNumber
Create new PhoneNumber instance by modifying
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
override

Operators

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

Static Methods

normalize(String number) String
Normalize number by removing additional symbols

Constants

empty → const PhoneNumber