Cicero
05/18/2021, 7:07 PMpublic fun NavGraphBuilder.composable(
route: String,
arguments: List<NamedNavArgument> = emptyList(),
deepLinks: List<NavDeepLink> = emptyList(),
content: @Composable (NavBackStackEntry) -> Unit
) {
I was recently thinking about a way to make it more sure that all the variables would be more involved in a way that we could assure correct navigation.
This came from a colleagues question about “if the route was different than the” called navigation path:
const val toTest = "$TEST/{$TEST_VALUE}"
fun test(testValue: Int) {
navController.navigate("$TEST/$testValue")
}
Because of this I was thinking if we could have an object that would make this a more sure process. Does it make sense? Is my process incorrect? Accepting suggestions 🙂
My plan now would be to overwrite this NavGraphBuilder.composable function in a way that it would receive this object and that I could use this object instead of this loose variables 🙂Ian Lake
05/19/2021, 12:38 AM