ResultEffect
inline fun <T> ResultEffect(resultEventBus: ResultEventBus = LocalResultEventBus.current, noinline onResult: suspend (T) -> Unit)
An Effect to provide a result event between different screens
The trailing lambda provides the result from a flow of results.
Parameters
resultEventBus
the ResultEventBus to retrieve the result from. The default value is read from the LocalResultEventBus composition local.
onResult
the callback to invoke when a result is received
Type Parameters
T
the type of the result that should be retrieved from this effect
fun <T> ResultEffect(resultKey: String, resultEventBus: ResultEventBus = LocalResultEventBus.current, onResult: suspend (T) -> Unit)
An Effect to provide a result event between different screens
The trailing lambda provides the result from a flow of results.
Parameters
resultKey
the key that should be associated with this effect
resultEventBus
the ResultEventBus to retrieve the result from. The default value is read from the LocalResultEventBus composition local.
onResult
the callback to invoke when a result is received