PhoneNumber class
Constructors
- PhoneNumber(Country? country, String? nationalNumber)
-
Create PhoneNumber instance using given
country
andnationalNumber
factory - PhoneNumber.countryCode(String countryCode, String nationalNumber)
-
Create PhoneNumber instance using country found by given
countryCode
andnationalNumber
factory - PhoneNumber.isoCode(String isoCode, String nationalNumber)
-
Create PhoneNumber instance using country found by given
isoCode
andnationalNumber
factory - PhoneNumber.parse(String value)
-
Parse given
value
into PhoneNumber instancefactory
Properties
- country → Country?
-
Phone number country
final
- formattedNumber → String
-
E.164 formatted phone number
final
- hashCode → int
-
The hash code for this object.
no setteroverride
- 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.
override
Constants
- empty → const PhoneNumber