State
A generic sealed class that represents the different states of an asynchronous operation or data loading process. It is particularly useful for managing UI state in Jetpack Compose, allowing for exhaustive handling of all possible outcomes.
Type Parameters
T
The type of data held by the Success state.
Inheritors
Functions
Link copied to clipboard
Executes the given composable block if the State is State.Failure. The Throwable associated with the failure is passed to the block.
Link copied to clipboard
Executes the given composable block if the State is State.Idle.
Link copied to clipboard
Executes the given composable block if the State is State.Loading.
Link copied to clipboard
Executes the given composable block if the State is State.Success. The block will receive the data from the State.Success as its parameter.