rememberPickerState

Functions summary

PickerState
@Composable
rememberPickerState(
    initialNumberOfOptions: Int,
    initiallySelectedOption: Int,
    repeatItems: Boolean
)

Creates a PickerState that is remembered across compositions.

Functions

rememberPickerState

@Composable
fun rememberPickerState(
    initialNumberOfOptions: Int,
    initiallySelectedOption: Int = 0,
    repeatItems: Boolean = true
): PickerState

Creates a PickerState that is remembered across compositions.

Parameters
initialNumberOfOptions: Int

the number of options

initiallySelectedOption: Int = 0

the option to show in the center at the start

repeatItems: Boolean = true

if true (the default), the contents of the component will be repeated