Composable Function

rememberPickerState

Creates a PickerState that is remembered across compositions.

rememberPickerState

Source set: 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.
Jetpack Compose beyond MaterialFree components, screens and templates for apps that don’t look like Google’s. Copy them into your app, or let your coding agent add them.Browse for free

Content updated: