dragSelectToggleableItem

fun <Item> Modifier.dragSelectToggleableItem(state: DragSelectState<Item>, item: Item, semanticsLabel: String = DEFAULT_LABEL, interactionSource: MutableInteractionSource? = null): Modifier

A convenience function for creating a Modifier that will toggle the selection state of an item in a DragSelectState. As well as add the long-click semantics to the item.

Parameters

Item

The type of item in the DragSelectState.

state

The DragSelectState to toggle the selection state of the item in.

item

The item to toggle the selection state of.

semanticsLabel

The label to use for the long-click semantics.

interactionSource

The MutableInteractionSource that will be used to emit PressInteraction.Press when this toggleable is being pressed.

See also