Pageable

Represents a paginated data source with flattened items and fetching state.

The item list automatically updates as pages are fetched based on the configured strategy.

Parameters

getPageKeyForItem

Maps an item back to its page key. Returns null if the item isn't associated with a page.

jumpTo

Loads and activates the specified page, returning its items. Subsequent fetches will be centered around this page.

Properties

Link copied to clipboard
Link copied to clipboard
val getPageKeyForItem: (item: PageItem) -> Key?
Link copied to clipboard
val isFetchingNext: StateFlow<Boolean>
Link copied to clipboard
val isFetchingPrevious: StateFlow<Boolean>
Link copied to clipboard
val items: StateFlow<List<PageItem>>
Link copied to clipboard
val jumpTo: suspend (key: Key) -> List<PageItem>?