Contact class

This class models a reference to an address.

Implemented types
Annotations

Constructors

Contact({List<Address> addresses = const <Address>[], DateTime? birthday, List<Chat> chats = const <Chat>[], List<CustomField> customFields = const <CustomField>[], List<Email> emails = const <Email>[], List<ContactEvent> events = const <ContactEvent>[], List<InternetCall> internetCalls = const <InternetCall>[], List<Job> jobs = const <Job>[], required Name name, String notes = '', required List<Phone> phones, List<Relationship> relationships = const <Relationship>[], List<Website> websites = const <Website>[]})
A reference to an address.
const
Contact.fromMap(Map<String, dynamic> map)
Creates a Contact instance starting from a Map<String, dynamic> map.

Properties

addresses List<Address>
A list of addresses that belong to this contact.
final
birthday DateTime?
The birthday of this contact.
final
chats List<Chat>
A list of chats that belong to this contact.
final
customFields List<CustomField>
A list of custom fields.
final
emails List<Email>
A list of emails that belong to this contact.
final
events List<ContactEvent>
A list of events that belong to this contact.
final
hashCode int
The hash code for this object.
no setteroverride
internetCalls List<InternetCall>
A list of Internet call references that belong to this contact.
final
jobs List<Job>
A list of the jobs that this contact performs.
final
name Name
The complete name of this contact.
final
notes String
Some notes relating to this contact.
final
phones List<Phone>
A list of phone numbers that belong to this contact.
final
relationships List<Relationship>
A list of relationships of this contact.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
websites List<Website>
A list of websites that belong to this contact.
final

Methods

call({required String label, int? index}) Future<bool>
Makes a call to a contact’s phone. It is based on the label and, optionally, on the position of the number (index) in the list of phones with the same label. In case index is null, the 1º in the list is called.
compareTo(covariant Contact 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, int? index, required String label}) Future<bool>
Sends a SMS to a contact’s phone. It requires a body. It is based on the label and, optionally, on the position of the number (index) in the list of phones with the same label. In case index is null, the 1º in the list is called.
toMap() Map<String, dynamic>
Creates a Map<String, dynamic> map representation of this instance.
toString() String
A string representation of this object.
inherited

Operators

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