ContactProperty enum

Enumeration of contact properties that can be fetched.

Property type for specifying which contact data to fetch or update.

Used in FlutterContacts.get and FlutterContacts.getAll to specify which properties to fetch. Also used internally by FlutterContacts.update and FlutterContacts.updateAll to determine which properties to update/delete and which to leave intact.

Properties not supported on a platform (e.g., ContactProperty.favorite on iOS) are ignored if included in the property list.

ContactProperty.debugData returns the entire database content for that contact for debugging purposes.

See ContactProperties for pre-defined property sets.

Example usage:

// Fetch all properties with thumbnail photo
final contact = await FlutterContacts.get(
  id,
  properties: {...ContactProperties.allProperties, ContactProperty.photoThumbnail},
);

// Fetch only name and phone
final contacts = await FlutterContacts.getAll(
  properties: {ContactProperty.name, ContactProperty.phone},
);

Note: The contact's ID and display name are always fetched.

Property Android iOS
name
phone
email
address
organization
website
socialMedia
event
relation
note
favorite
ringtone
sendToVoicemail
photoThumbnail
photoFullRes
timestamp
identifiers
debugData
Inheritance
Available extensions

Values

name → const ContactProperty

Structured name property.

phone → const ContactProperty

Phone numbers.

email → const ContactProperty

Email addresses.

address → const ContactProperty

Postal addresses.

organization → const ContactProperty

Organization information.

website → const ContactProperty

Website URLs.

socialMedia → const ContactProperty

Social media profiles.

event → const ContactProperty

Events (e.g., birthdays, anniversaries).

relation → const ContactProperty

Relationships to other people.

note → const ContactProperty

Notes. On iOS, it requires FlutterContacts.config.enableIosNotes = true. See Apple's documentation.

favorite → const ContactProperty

Whether contact is starred/favorited (Android only).

ringtone → const ContactProperty

URI for custom ringtone (Android only).

sendToVoicemail → const ContactProperty

Whether to send calls to voicemail (Android only).

photoThumbnail → const ContactProperty

Contact photo thumbnail.

photoFullRes → const ContactProperty

Contact photo full resolution.

timestamp → const ContactProperty

Last update timestamp (Android only).

identifiers → const ContactProperty

Android-specific contact identifiers (Android only).

debugData → const ContactProperty

All data mimetypes for debugging (Android only).

Properties

hashCode int
The hash code for this object.
no setterinherited
index int
A numeric identifier for the enumerated value.
no setterinherited
name String

Available on Enum, provided by the EnumName extension

The name of the enum value.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

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

Constants

values → const List<ContactProperty>
A constant List of the values in this enum, in order of their declaration.