Source set: Common
public object LazyListDefaults
Contains the default values used by LazyColumn and LazyRow.
Functions
cacheWindow
Source set: Common
@Composable
public fun cacheWindow(state: LazyListState): LazyLayoutCacheWindow
Creates and remembers the default LazyLayoutCacheWindow for LazyColumn and LazyRow.
- Prefetches items ahead in the scroll direction based on the average size of visible items
- Does not retain items behind the viewport.
- Does not cache while the user is not scrolling.
from state, clamped between 10% and 50% of the viewport.
Parameters
| state | the LazyListState used to calculate the average visible item size |
Return
the default LazyLayoutCacheWindow