Contact

data class Contact(val id: String, val name: String, val phoneNumbers: List<String>, val email: List<String>, val contactAvatar: ByteArray?)(source)

A platform-agnostic data model representing a contact's profile information.

This class serves as the core data transfer object for the Contact Picker library, aggregating details retrieved from the native address books of different platforms.

Annotated with Immutable to optimize recomposition performance in Jetpack Compose by signaling that all public properties are stable and will not change after construction.

Constructors

Link copied to clipboard
constructor(id: String, name: String, phoneNumbers: List<String>, email: List<String>, contactAvatar: ByteArray?)

Properties

Link copied to clipboard

The raw binary data (byte array) of the contact's profile picture or thumbnail. Can be converted to an ImageBitmap using the provided platform extensions.

Link copied to clipboard

A list of all email addresses associated with this contact.

Link copied to clipboard
val id: String

A unique, platform-specific string identifier for the contact (e.g., RowID on Android, UUID on iOS).

Link copied to clipboard

The full display name as recorded in the user's contacts.

Link copied to clipboard

A list of all phone numbers associated with this contact.

Functions

Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
Link copied to clipboard
open override fun hashCode(): Int