Phone class

This class models a reference to a phone’s number.

Implemented types
Annotations

Constructors

Phone({required String countryCode, required String label, required String local})
A reference to a phone’s number.
const
Phone.fromMap(Map<String, dynamic> map)
Creates a Phone instance starting from a Map<String, dynamic> map.

Properties

countryCode String
The country code. For example, for USA it will be '1' and for Italy it will be '39'.
final
hashCode int
The hash code for this object.
no setteroverride
label String
The label of this phone number. It is useful for distinguishing different phone numbers.
final
local String
The local part of this phone number.
final
number String
Gets the number string in the “+countryCode local” format.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

call() Future<bool>
Calls to this phone number.
compareTo(covariant Phone other) int
The order of the comparisons is:
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
sms({required String body}) Future<bool>
Sends a SMS to this phone number. It requires a body.
toMap() Map<String, dynamic>
Creates a Map<String, dynamic> map representation of this instance.
toString() String
A string representation of this object.
override

Operators

operator <(covariant Phone other) bool
Returns if this instance is less than the other.
operator <=(covariant Phone other) bool
Return if this instance is less than or equal to the other.
operator ==(covariant Phone other) bool
The equality operator.
override
operator >(covariant Phone other) bool
Return if this instance is greater than the other.
operator >=(covariant Phone other) bool
Return if this instance is greater than or equal to the other.