rememberScrollFieldState

Functions summary

ScrollFieldState

Creates and remembers a ScrollFieldState to be used with a ScrollField.

Cmn

Functions

rememberScrollFieldState

@ExperimentalMaterial3ExpressiveApi
@Composable
fun rememberScrollFieldState(itemCount: Int, index: Int = 0): ScrollFieldState

Creates and remembers a ScrollFieldState to be used with a ScrollField.

Parameters
itemCount: Int

the total number of unique items to be displayed in the scrollable wheel.

index: Int = 0

the initial selected index of the scroll field.

Returns
ScrollFieldState

a ScrollFieldState that can be used to control or observe the scroll field.