Composable Function

rememberScrollFieldState

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

rememberScrollFieldState

Source set: Common
@Composable
public fun rememberScrollFieldState(itemCount: Int, index: Int = 0): ScrollFieldState

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

Parameters

itemCount the total number of unique items to be displayed in the scrollable wheel.
index the initial selected index of the scroll field.

Return

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

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: