ContactPhone class
Represents a phone number
- Annotations
Constructors
- ContactPhone({required String number, PhoneLabel label = PhoneLabel.mobile, String customLabel = '', bool isPrimary = false})
-
Creates a ContactPhone with the given parameters
const
-
ContactPhone.fromJson(Map<
String, dynamic> json) -
Creates a phone from a JSON map
factory
Properties
- customLabel → String
-
Custom label text when label is PhoneLabel.custom
final
- displayLabel → String
-
Returns the display label for this phone number
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- isPrimary → bool
-
Whether this is the primary phone number
final
- label → PhoneLabel
-
The label type for this phone number
final
- normalizedNumber → String
-
Returns the normalized phone number (digits only)
no setter
- number → String
-
The phone number
final
-
props
→ List<
Object?> -
The list of properties that will be used to determine whether
two instances are equal.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- stringify → bool?
-
If set to
true, thetoStringmethod will be overridden to output this instance'sprops.no setterinherited
Methods
-
copyWith(
{String? number, PhoneLabel? label, String? customLabel, bool? isPrimary}) → ContactPhone - Creates a copy of this contact phone with the given fields replaced with new values
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, dynamic> - Converts this phone to a JSON map
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited