HandleResult

Handles a Route.Result.Data matching a given NavigationBundleSpec

Parameters

Row

the type of NavigationBundleSpecRow to.

spec

The NavigationBundleSpec used to create the Route.Result

retain

If true the result will be retained in the NavBackStackEntry. It will be deleted otherwise.

onResult

Method for handling the received result

Throws

if the Bundle does not contain the correct keys or values associated with the NavigationBundleSpec


fun <T> NavHostController.HandleResult(type: NavigationBundleSpecType<T>, retain: Boolean = false, onResult: T.() -> Unit)

Handles a Route.Result.Data matching a given NavigationBundleSpecType Requires that Route.Result.Data.bundle is described by a SingleValueNavigationSpec matching the NavigationBundleSpecType

Parameters

T

the type of the result.

type

The NavigationBundleSpecType stored in the result

retain

If true the result will be retained in the NavBackStackEntry. It will be deleted otherwise.

onResult

Method for handling the received result

Throws