SimpleNavigationViewModel
A ViewModel that provides methods to get the parameter of the current destination.
This is a helper view model. You may inject the Navigator directly into your view model instead.
To get an instance of this view model use:
val vm: SimpleNavigationViewModel = hiltViewModel()
Functions
Current destination as flow.
Checks whether the given destination is in the back stack.
Requests navigation to the given destination which takes no input parameter.
Requests navigation to the given destination. An required parameter must be passed.
Navigates up to previous destination, or finishes the Activity.
Navigates up to previous destination passing the given result, or finishes the Activity.
Returns the parameter of the current destination, or null, if hasn't been set.
Returns the parameter of the current destination, or null, if hasn't been set.
Creates a flow that will emit the results of the navigation from the given destination.