toState

@JvmName(name = "toStateList")
fun <Key : Any, PageItem> Pageable<Key, PageItem>.toState(state: LazyListState, key: (PageItem) -> Any, coroutineContext: CoroutineContext = Dispatchers.Default): PageableComposeState<PageItem>

Binds a Pageable to a LazyListState, enabling automatic page fetching as items become visible.


@JvmName(name = "toStateGrid")
fun <Key : Any, PageItem> Pageable<Key, PageItem>.toState(state: LazyGridState, key: (PageItem) -> Any, coroutineContext: CoroutineContext = Dispatchers.Default): PageableComposeState<PageItem>

Binds a Pageable to a LazyGridState, enabling automatic page fetching as items become visible.


@JvmName(name = "toStateStaggeredGrid")
fun <Key : Any, PageItem> Pageable<Key, PageItem>.toState(state: LazyStaggeredGridState, key: (PageItem) -> Any, coroutineContext: CoroutineContext = Dispatchers.Default): PageableComposeState<PageItem>

Binds a Pageable to a LazyStaggeredGridState, enabling automatic page fetching as items become visible.


@JvmName(name = "toStateListDeprecated")
fun <Key : Any, PageItem> Pageable<Key, PageItem>.toState(state: LazyListState, key: (PageItem) -> Any, anchored: Boolean, coroutineContext: CoroutineContext = Dispatchers.Default): PageableComposeState<PageItem>
@JvmName(name = "toStateGridDeprecated")
fun <Key : Any, PageItem> Pageable<Key, PageItem>.toState(state: LazyGridState, key: (PageItem) -> Any, anchored: Boolean, coroutineContext: CoroutineContext = Dispatchers.Default): PageableComposeState<PageItem>
@JvmName(name = "toStateStaggeredGridDeprecated")
fun <Key : Any, PageItem> Pageable<Key, PageItem>.toState(state: LazyStaggeredGridState, key: (PageItem) -> Any, anchored: Boolean, coroutineContext: CoroutineContext = Dispatchers.Default): PageableComposeState<PageItem>

Deprecated

The usage of `anchored = true` is discouraged because the loading of pages will not adapt to the amount of visible pages on screen

Replace with

toState(state, key)