You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@nickstamp93 in new version of navigation you can pass data back to your previous destination this feature added in 2.3.0-alpha03
you can send data from destination B like this: navController.previousBackStackEntry?.savedStateHandle?.set("key", result)
and get data in destination A like this:
navController.currentBackStackEntry?.savedStateHandle?.getLiveData("key")?.observe(
viewLifecycleOwner) { result ->
// Do something with the result.
}
Let's say i have a destination (bottom sheet, fragment) that adds a new item in the repository. How should i get a callback or a results from it?
The text was updated successfully, but these errors were encountered: