Composable Function

rememberScrollState

Create and [remember] the [ScrollState] based on the currently appropriate scroll configuration to allow changing scroll position or observing scroll behavior.

rememberScrollState

Common
@Composable
fun rememberScrollState(initial: Int = 0): ScrollState

Create and remember the ScrollState based on the currently appropriate scroll configuration to allow changing scroll position or observing scroll behavior.

Learn how to control the state of Modifier.verticalScroll or Modifier.horizontalScroll:

Parameters

initial initial scroller position to start with