rememberPickerState
Composable Function
Android
@Composable
public fun rememberPickerState(
@IntRange(from = 1) initialNumberOfOptions: Int,
@IntRange(from = 0) initiallySelectedIndex: Int = 0,
shouldRepeatOptions: Boolean = true,
): PickerState
Creates a PickerState
that is remembered across compositions.
Parameters
initialNumberOfOptions | the number of options. |
initiallySelectedIndex | the index of the option to show in the center at the start, zero-based. |
shouldRepeatOptions | if true (the default), the options will be repeated. |