Contact class

Represents a complete contact with all its information

Annotations

Constructors

Contact({required String id, required String displayName, ContactName name = const ContactName(), List<ContactPhone> phones = const [], List<ContactEmail> emails = const [], List<ContactAddress> addresses = const [], List<ContactOrganization> organizations = const [], List<String> notes = const [], List<String> websites = const [], List<String> socialProfiles = const [], List<ContactEvent> events = const [], List<String> groups = const [], List<String> accounts = const [], Uint8List? thumbnail, Uint8List? photo, bool isStarred = false, List<String> linkedContactIds = const [], bool propertiesFetched = false, bool thumbnailFetched = false, bool photoFetched = false})
Creates a Contact with the given parameters
const
Contact.fromJson(Map<String, dynamic> json)
Creates a contact from a JSON map
factory

Properties

accounts List<String>
List of accounts this contact is associated with
final
addresses List<ContactAddress>
List of postal addresses
final
anniversaries List<ContactEvent>
Returns all anniversary events
no setter
bestAvailableImage Uint8List?
Returns the best available image (photo or thumbnail)
no setter
birthday ContactEvent?
Returns the birthday event if available
no setter
displayName String
Display name of the contact
final
emails List<ContactEmail>
List of email addresses
final
events List<ContactEvent>
List of events (birthdays, anniversaries, etc.)
final
groups List<String>
List of groups this contact belongs to
final
hasContactInfo bool
Returns true if the contact has any contact information
no setter
hashCode int
The hash code for this object.
no setterinherited
id String
Unique identifier for the contact
final
isStarred bool
Whether the contact is starred/favorited
final
linkedContactIds List<String>
List of linked contact IDs (for unified contacts)
final
name ContactName
Structured name information
final
notes List<String>
List of notes
final
organizations List<ContactOrganization>
List of organizations/jobs
final
phones List<ContactPhone>
List of phone numbers
final
photo Uint8List?
High-resolution photo
final
photoFetched bool
Whether photo was fetched
final
primaryEmail ContactEmail?
Returns the primary email address if available
no setter
primaryPhone ContactPhone?
Returns the primary phone number if available
no setter
propertiesFetched bool
Whether detailed properties were fetched
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
socialProfiles List<String>
List of social profiles
final
stringify bool?
If set to true, the toString method will be overridden to output this instance's props.
no setterinherited
summary String
Returns a brief summary of the contact for display
no setter
thumbnail Uint8List?
Low-resolution thumbnail image
final
thumbnailFetched bool
Whether thumbnail was fetched
final
websites List<String>
List of website URLs
final

Methods

copyWith({String? id, String? displayName, ContactName? name, List<ContactPhone>? phones, List<ContactEmail>? emails, List<ContactAddress>? addresses, List<ContactOrganization>? organizations, List<String>? notes, List<String>? websites, List<String>? socialProfiles, List<ContactEvent>? events, List<String>? groups, List<String>? accounts, Uint8List? thumbnail, Uint8List? photo, bool? isStarred, List<String>? linkedContactIds, bool? propertiesFetched, bool? thumbnailFetched, bool? photoFetched}) Contact
Creates a copy of this contact 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 contact to a JSON map
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited