API reference

PagedResults

Updated: Aug 26, 2025

PagedResults

abstract class PagedResults<T>
Provides access to paginated information from a backend.

Properties

NameSummary
val <T> PagedResults<T>.pages: Flow<Page<T>>
Cold flow of paged data updates.

Functions

NameSummary
addResultsObserver
open fun addResultsObserver(observer: PagedResultsObserver<T>)
Add an observer of the currently fetched pages.
fetchInitialPage
open fun fetchInitialPage(): CompletableFuture⁠<Void⁠>
Move back to the initial page of data.
fetchNextPage
open fun fetchNextPage(): CompletableFuture⁠<Boolean⁠>
Move to the next page of data.
fetchPreviousPage
open fun fetchPreviousPage(): CompletableFuture⁠<Boolean⁠>
Move to the previous page of data.
getFetchedPages
open fun getFetchedPages(): List⁠<Page<T>>
Returns the list of currently fetched pages.
hasNextPage
open fun hasNextPage(): Boolean⁠
Returns if there is a next page to fetch.
hasPreviousPage
open fun hasPreviousPage(): Boolean⁠
Returns if there is a previous page to fetch.
suspend fun <T> PagedResults<T>.initialPage()
suspend fun <T> PagedResults<T>.nextPage(): Boolean⁠
suspend fun <T> PagedResults<T>.previousPage(): Boolean⁠
removeResultsObserver
open fun removeResultsObserver(observer: PagedResultsObserver<T>): Boolean⁠
Remove an observer of the currently fetched pages.