navigateOrElse
fun <Action : NavigationAction<*>> Navigator<Action>.navigateOrElse(action: Action, onFailure: () -> Unit)
Triggers a given NavigationAction or executes a closure if the navigation failed to complete.
Parameters
action
The Action to trigger.
onFailure
Closure for handling case when navigation failed.
Type Parameters
Action
The type of NavigationAction to be given.