PagingDataSource

abstract class PagingDataSource<Key : Any, Value : Any>

Base class for an abstraction of pageable static data from some source, where loading pages of data is typically an expensive operation. Some examples of common PagingDataSources might be from network or from a database.

An instance of a PagingDataSource is used to load pages of data for an instance of Pager.

Constructors

Link copied to clipboard
fun PagingDataSource()

Types

Link copied to clipboard
sealed class LoadParams<Key : Any>

Parameters to use for a load request on a PagingDataSource.

Link copied to clipboard
sealed class LoadResult<Key : Any, Value : Any>

Functions

Link copied to clipboard
abstract suspend fun load(params: PagingDataSource.LoadParams<Key>): PagingDataSource.LoadResult<Key, Value>