ListBoxItemsParams

data class ListBoxItemsParams<T : ListBoxItemHeader>(val items: List<T>, val itemContent: @Composable (T) -> Unit, val contentPadding: PaddingValues = MenuDefaults.DropdownMenuItemContentPadding, val onItemClick: (T) -> Unit?)(source)

Data class that represents a list of items that Implement ListBoxItemHeader interface and is used to separate the items by headers

Parameters

T

The type of items in the list that implement ListBoxItemHeader.

Constructors

Link copied to clipboard
constructor(items: List<T>, itemContent: @Composable (T) -> Unit, contentPadding: PaddingValues = MenuDefaults.DropdownMenuItemContentPadding, onItemClick: (T) -> Unit?)

Properties

Link copied to clipboard

the padding applied to the content of this ListBox

Link copied to clipboard

Composable function of how each item is going to be drawn.

Link copied to clipboard
val items: List<T>

list of items to be drawn as options.

Link copied to clipboard
val onItemClick: (T) -> Unit?

the callback that is triggered when on option es selected. Selected object comes as a parameter of the callback.