LazyListPrefetchStrategy

Function

Common
@ExperimentalFoundationApi
fun LazyListPrefetchStrategy(nestedPrefetchItemCount: Int = 2): LazyListPrefetchStrategy

Creates an instance of the default LazyListPrefetchStrategy, allowing for customization of the nested prefetch count.

Parameters

nestedPrefetchItemCountspecifies how many inner items should be prefetched when this LazyList is nested inside another LazyLayout. For example, if this is the state for a horizontal LazyList nested in a vertical LazyList, you might want to set this to the number of items that will be visible when this list is scrolled into view. If automatic nested prefetch is enabled, this value will be used as the initial count and the strategy will adapt the count automatically.