on Idle
Executes the given composable block if the State is State.Idle.
This is a convenience function to simplify conditional rendering based on the state.
Example usage:
val myState: State<String> = ...
myState.onIdle {
Text("Waiting for data...")
}Content copied to clipboard
Parameters
block
The composable block to execute if the state is Idle.