NavHostResultHandler

A Handler that will allow a NavHostController to handle com.splendo.kaluga.architecture.compose.navigation.Route.Result of a given type Result to be received by a given ViewModel

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

Constructors

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