NavHostResultHandler

Creates a NavHostResultHandler of Row for this NavigationBundleSpec

Return

the NavHostResultHandler

Parameters

ViewModel

the type of BaseLifecycleViewModel associated with the NavHostResultHandler

Row

the type of NavigationBundleSpecRow associated with this NavigationBundleSpec

retain

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

onResult

Method for handling the received result


Creates a NavHostResultHandler of T for this NavigationBundleSpecType Requires that Route.Result.Data.bundle is described by a SingleValueNavigationSpec matching the NavigationBundleSpecType

Return

the NavHostResultHandler

Parameters

ViewModel

the type of BaseLifecycleViewModel associated with the NavHostResultHandler

T

the type of result to expect

retain

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

onResult

Method for handling the received result


inline fun <ViewModel : BaseLifecycleViewModel, T> KSerializer<T>.NavHostResultHandler(retain: Boolean = false, noinline onResult: ViewModel.(T) -> Unit): NavHostResultHandler<ViewModel, T>

Creates a NavHostResultHandler of T for this KSerializer Requires that the Route.Result.Data.bundle is described by a SingleValueNavigationSpec matching NavigationBundleSpecType.SerializedType with this Serializer

Return

the NavHostResultHandler

Parameters

ViewModel

the type of BaseLifecycleViewModel associated with the NavHostResultHandler

T

the type of serialized property 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 T