Contact class abstract

This object represents a phone contact.

Available extensions
Annotations
  • @freezed

Constructors

Contact({@JsonKey.new(name: 'phone_number') required String phoneNumber, @JsonKey.new(name: 'first_name') required String firstName, @JsonKey.new(name: 'last_name') String? lastName, @JsonKey.new(name: 'user_id') int? userId, @JsonKey.new(name: 'vcard') String? vcard})
Constructs a Contact object.
const
factory
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

map<TResult extends Object?>(TResult $default(_Contact value)) → TResult

Available on Contact, provided by the ContactPatterns extension

A switch-like method, using callbacks.
mapOrNull<TResult extends Object?>(TResult? $default(_Contact value)?) → TResult?

Available on Contact, provided by the ContactPatterns extension

A variant of map that fallback to returning null.
maybeMap<TResult extends Object?>(TResult $default(_Contact value)?, {required TResult orElse()}) → TResult

Available on Contact, provided by the ContactPatterns extension

A variant of map that fallback to returning orElse.
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