-
public final class OpenResultRecipientKt
-
-
Method Summary
Modifier and Type Method Description final static <R extends Any> UnitonResult(OpenResultRecipient<R> $self, Function0<Unit> onCancelled, Function1<R, Unit> onValue)Like OpenResultRecipient.onNavResult but using a different API that may feel better in some cases. -
-
Method Detail
-
onResult
@Composable() final static <R extends Any> Unit onResult(OpenResultRecipient<R> $self, Function0<Unit> onCancelled, Function1<R, Unit> onValue)
Like OpenResultRecipient.onNavResult but using a different API that may feel better in some cases.
If you don't need to do anything when the result sender screen is cancelled without any value, you can:
screenResult.onResult { resultValue -> println("got result $resultValue") }Otherwise:
screenResult.onResult( onValue = { resultValue -> println("got result $resultValue") }, onCancelled = { println("did not get result") } )
-
-
-
-