Loadable

data class Loadable<out T : Any>(    val loading: Boolean = false,     val data: T? = null,     val error: CombinedLoadingError? = null)

Replica state that can be observed on a UI. In opposite to ReplicaState this class contains very limited set of fields.

Constructors

Link copied to clipboard
fun <out T : Any> Loadable(    loading: Boolean = false,     data: T? = null,     error: CombinedLoadingError? = null)

Properties

Link copied to clipboard
val data: T? = null
Link copied to clipboard
val error: CombinedLoadingError? = null
Link copied to clipboard
val loading: Boolean = false

Extensions

Link copied to clipboard
fun <T : Any, R : Any> Loadable<T>.mapData(transform: (T) -> R): Loadable<R>

Transforms data with a transform functions.