Created
June 19, 2020 00:48
-
-
Save Zhuinden/65edfbbb85bb095664fe8f938a635a88 to your computer and use it in GitHub Desktop.
Hilt NavigationDispatcher
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The idea of this sample is to use it in viewmodel to navigate, something like this
navigationDispatcher.emit { navController -> navController.navigateUp() }
for example. How to use result API and return something when fragment is required and there is no way to get fragment from navController? Did you have a need for this? I ended up using an older API something like
previousBackStackEntry?.savedStateHandle?.set(key, result)