ImagesPicker
fun ImagesPicker(images: List<AttachmentPickerItemState>, onImageSelected: (AttachmentPickerItemState) -> Unit, modifier: Modifier = Modifier, itemContent: @Composable (AttachmentPickerItemState) -> Unit = { imageItem ->
DefaultImagesPickerItem(
imageItem = imageItem,
onImageSelected = onImageSelected,
)
}, showAddMore: Boolean = false, onAddMoreClick: () -> Unit = {}, addMoreContent: @Composable () -> Unit = {
DefaultAddMoreItem(onAddMoreClick)
})
Shows the UI for images the user can pick for message attachments. Exposes the logic of selecting items.
Parameters
images
The images the user can pick, to be rendered in a list.
onImageSelected
Handler when the user clicks on any image item.
modifier
Modifier for styling.
itemContent
Composable rendering an image/video item in the picker.
showAddMore
Flag indicating the the "Add more" item should be shown at the beginning of the picker.
onAddMoreClick
Action to be invoked when the user clicks on the "Add more" item.
addMoreContent
Composable rendering the "Add more" item.