mattinger
08/17/2021, 3:05 PMIan Lake
08/17/2021, 4:45 PMnavigate()
. If you want to make your own extension method that pre-defines NavOptions, etc. if you want to reuse it in multiple places, go for it - it is just Kotlin codemattinger
08/18/2021, 1:56 PMaction_screenName_next
so that the fragment itself didn’t have to care if there were pops needed to get to the next screen, or which screen was next. It made testing very easy, because you could put in a mock navController and just verify on the navigate function.Ian Lake
08/18/2021, 2:44 PMTestNavHostController
for a fully operational fakeIan Lake
08/18/2021, 2:46 PMmattinger
08/18/2021, 5:05 PMmattinger
08/18/2021, 5:05 PMonNavigate = { navController.navigate(it) },
mattinger
08/18/2021, 5:06 PMmattinger
08/18/2021, 5:07 PMIan Lake
08/18/2021, 5:25 PM