I am way late on this, but I'm unsure how to get t...
# compose
d
I am way late on this, but I'm unsure how to get the
{args}
in this case with the dynamic nature of this. In my case, Composable A has an optional navArg that Navigates to Composable B. B navigates to A with an actual navArg instead of the default. It looks like the following:
A(defaultValue) -> B -> A(actualValueFromB)
This can repeat in a circular way too:
...A(actualValueFromB -> B -> A(actualValueFromB)
I'm unsure how to retrieve the exact route from
A
in
B
. Does anyone have any suggestions? Edit: I've answered my own question with the following
route = navController.previousBackStackEntry!!.destination.route!!