DataState

data class DataState<T> : UiState<Flow<LoadState>>

Model that view models create for UI components to observe on

Parameters

model

LiveData for the UI to observe

loadState

Load status to show to the user this value is importantly only when refresh is requested

refresh

Refreshes & invalidates underlying data source fetches it from scratch.

retry

Retries any failed requests.

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
open override val loadState: Flow<LoadState>
Link copied to clipboard
val model: Flow<T>
Link copied to clipboard
open override val refresh: suspend () -> Unit
Link copied to clipboard
open override val retry: suspend () -> Unit