Contact class abstract
This object represents a phone contact.
- Annotations
-
- @freezed
Constructors
- Contact.new({@JsonKey(name: 'phone_number') required String phoneNumber, @JsonKey(name: 'first_name') required String firstName, @JsonKey(name: 'last_name') String? lastName, @JsonKey(name: 'user_id') int? userId, @JsonKey(name: 'vcard') String? vcard})
-
Constructs a Contact object.
constfactory
-
Contact.fromJson(Map<
String, dynamic> json) -
Creates a Contact object from json.
factory
Properties
-
copyWith
→ $ContactCopyWith<
Contact> -
Create a copy of Contact
with the given fields replaced by the non-null parameter values.
no setterinherited
- firstName → String
-
Contact's first name
no setterinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- lastName → String?
-
Optional. Contact's last name
no setterinherited
- phoneNumber → String
-
Contact's phone number
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- userId → int?
-
Optional. Contact's user identifier in Telegram
no setterinherited
- vcard → String?
-
Optional. Additional data about the contact in the form of a
vCard
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, dynamic> -
Serializes this Contact to a JSON map.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited