Phone class

A phone number.

Once created, no properties of an Phone object may be changed.

Annotations
  • @immutable

Constructors

Phone({String? label, required String phone})
Constructs a Phone instance.
const
Phone.fromJson(String json)
Constructs a Phone instance from a json string.
factory
Phone.fromMap(Map<String, dynamic> map)
Constructs a Phone instance from a map.

Properties

hashCode int
The hash code for this object.
no setteroverride
label String?
The label.
final
phone String
The phone number.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

copyWith({String? label, String? phone}) Phone
Creates a copy of this Phone instance but with the given fields replaced with the new values.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() String
Creates a JSON string representing this Phone instance.
toMap() Map<String, dynamic>
Creates a Map<String, dynamic> representing this Phone instance.
toString() String
A string representation of this object.
override

Operators

operator ==(covariant Phone other) bool
The equality operator.
override