DataState
class DataState<out T> @RestrictTo(value = [RestrictTo.Scope.LIBRARY_GROUP_PREFIX] ) constructor(val loading: Boolean, val content: T?, val error: Throwable? = null)
DataState class to represent the different states of a value.
Parameters
T
The type of the content.
Constructors
Properties
Functions
Link copied to clipboard
inline fun <T> DataState<T>.UiStates(loading: @Composable () -> Unit, failure: @Composable (error: Throwable?) -> Unit, content: @Composable (content: T, loading: Boolean, error: Throwable?) -> Unit)
Composable function to render the different states of a DataState object.