NavHostResultHandler

constructor(viewModelClass: KClass<ViewModel>, handleResult: @Composable NavHostController.((Result) -> Unit) -> Unit, onResult: ViewModel.(Result) -> Unit)

Parameters

ViewModel

the type of BaseLifecycleViewModel that will respond to the Route.Result

Result

the type of the result to expect

viewModelClass
handleResult

A Composable method for setting up a NavHostController to return a Result through a callback.

onResult

Callback method called on a ViewModel to handle a given Result