AttachmentsPicker

fun AttachmentsPicker(attachmentsPickerViewModel: AttachmentsPickerViewModel, onAttachmentsSelected: (List<Attachment>) -> Unit, onTabClick: (Int, AttachmentsPickerMode) -> Unit, onAttachmentPickerAction: (AttachmentPickerAction) -> Unit = {}, onDismiss: () -> Unit, modifier: Modifier = Modifier, tabFactories: List<AttachmentsPickerTabFactory> = ChatTheme.attachmentsPickerTabFactories, shape: Shape = ChatTheme.shapes.bottomSheet)

Represents the bottom bar UI that allows users to pick attachments. The picker renders its tabs based on the tabFactories parameter. Out of the box we provide factories for images, files and media capture tabs.

Parameters

channel

The channel where the attachments picker is being used.

attachmentsPickerViewModel

ViewModel that loads the images or files and persists which items have been selected.

onAttachmentPickerAction

A lambda that will be invoked when an action is happened.

onAttachmentsSelected

Handler when attachments are selected and confirmed by the user.

onDismiss

Handler when the user dismisses the UI.

modifier

Modifier for styling.

tabFactories

The list of attachment picker tab factories.

shape

The shape of the dialog.