rememberPagerState

fun rememberPagerState(@IntRange(from = 0.toLong()initialPage: Int = 0): PagerState

Creates a PagerState that is remembered across compositions.

Changes to the provided values for initialPage will not result in the state being recreated or changed in any way if it has already been created.

Parameters

initialPage

the initial value for PagerState.currentPage

Sources

androidJvm source
Link copied to clipboard