PagingData

data class PagingData<Value : Any>(    val list: List<Value>,     val state: PagingData.LoadState,     val totalCount: Int?)

Contain current paged data (in list) and current load state (in state)

Constructors

Link copied to clipboard
fun <Value : Any> PagingData(    list: List<Value>,     state: PagingData.LoadState,     totalCount: Int?)

Types

Link copied to clipboard
object Companion
Link copied to clipboard
sealed class LoadState

Model of load state.

Properties

Link copied to clipboard
val list: List<Value>

The list of currently fetched data

Link copied to clipboard
val state: PagingData.LoadState

The current state of fetching operation

Link copied to clipboard
val totalCount: Int?

The total item count, if reported in PagingDataSource.LoadResult.Page

Extensions

Link copied to clipboard
fun <I : Any, O : Any> PagingData<I>.map(transform: (I) -> O): PagingData<O>

Returns a PagingData containing the results of applying the given transform function to each element in the original list.