Package 

Class AttachmentPickerKt

    • Method Summary

      Modifier and Type Method Description
      final static Unit AttachmentPicker(AttachmentsPickerViewModel attachmentsPickerViewModel, Modifier modifier, MessageMode messageMode, AttachmentPickerActions actions, MessageAction messageAction) The main attachment picker component that allows users to select and attach files to messages.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • AttachmentPicker

        @Composable() final static Unit AttachmentPicker(AttachmentsPickerViewModel attachmentsPickerViewModel, Modifier modifier, MessageMode messageMode, AttachmentPickerActions actions, MessageAction messageAction)

        The main attachment picker component that allows users to select and attach files to messages.

        This composable displays tabs for different attachment types (gallery, files, camera, polls, commands) and the corresponding content for the selected tab. It is typically wrapped by AttachmentPickerMenu which handles the animated expand/collapse behavior and positioning.

        The picker behavior is configured through ChatTheme.config.attachmentPicker:

        • When useSystemPicker is true, shows buttons that launch system pickers (no permissions required)

        • When useSystemPicker is false, shows an in-app grid picker (requires storage permissions)

        The picker integrates with AttachmentsPickerViewModel to manage state and with the message composer to add selected attachments to messages.

        For customization, override the picker components in ChatTheme.componentFactory:

        • AttachmentTypePicker - The tab bar for switching between modes

        • AttachmentPickerContent - The content area for each mode

        • AttachmentSystemPicker - The system picker variant

        Parameters:
        attachmentsPickerViewModel - The AttachmentsPickerViewModel that manages picker state, including the current mode, available attachments, and selection state.
        modifier - The modifier to be applied to the picker container.
        messageMode - The current message mode (MessageMode.Normal or MessageMode.MessageThread).
        actions - The AttachmentPickerActions that handle user interactions within the picker.
        messageAction - The composer action currently active; drives per-command enabled state in the picker's command section.