NavHostResultHandler
class NavHostResultHandler<ViewModel : BaseLifecycleViewModel, Result>(viewModelClass: KClass<ViewModel>, handleResult: @Composable NavHostController.((Result) -> Unit) -> Unit, onResult: ViewModel.(Result) -> Unit)
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
handleResult
A Composable method for setting up a NavHostController to return a Result through a callback.
Constructors
Link copied to clipboard
constructor(viewModelClass: KClass<ViewModel>, handleResult: @Composable NavHostController.((Result) -> Unit) -> Unit, onResult: ViewModel.(Result) -> Unit)