Compose Unstyled 2.0 is out! Check the official announcement blog ->
Composable Function

rememberSelectionState

Create and remember a SelectionState.

rememberSelectionState

Source set: Common
@Composable
fun rememberSelectionState(): SelectionState

Create and remember a SelectionState. The state is remembered using rememberSaveable and will be saved and restored with the composition.

If you need to store a SelectionState in another object, use the SelectionState.Saver object to manually save and restore the state.

Last updated: