FilesPicker
fun FilesPicker(files: List<AttachmentPickerItemState>, onItemSelected: (AttachmentPickerItemState) -> Unit, onBrowseFilesResult: (List<Uri>) -> Unit, modifier: Modifier = Modifier, allowMultipleSelection: Boolean = true, itemContent: @Composable (AttachmentPickerItemState) -> Unit = {
DefaultFilesPickerItem(
fileItem = it,
onItemSelected = onItemSelected,
allowMultipleSelection = allowMultipleSelection,
)
})
Shows the UI for files the user can pick for message attachments. Exposes the logic of selecting items and browsing for extra files.
Parameters
files
The files the user can pick, to be rendered in a list.
onItemSelected
Handler when the user clicks on any file item.
onBrowseFilesResult
Handler when the user clicks on the browse more files action.
modifier
Modifier for styling.
allowMultipleSelection
When true, users can select multiple files. When false, only single file selection is allowed. Defaults to true.
itemContent
Composable for rendering individual file items.