I have an onboarding flow that asks for user's inp...
# compose-android
e
I have an onboarding flow that asks for user's input which shares the same top bar showing the current progress. My initial attempt was using a horizontal pager. The structure is a Scaffold with top bar showing the progress bar, a bottom bar that varies based on the current step, and the main content is the horizontal pager. However, with this approach, the onboarding flow composable is becoming a bit bloated. With Nav3, I am wondering if
SceneStrategy
could a good fit for this scenario. The scene would be responsible for handling the shared top progress bar and each step in the onboarding flow is a
NavEntry
. Also, how should I scope the ViewModel so that it's only shared among these NavEntry.
s
Funnily enough I was building exactly this last week. I didn't involve nav scenes at all here. Just have a normal shared composable for the top app bar for those screens, and slap a .sharedBounds() modifier on it, that's it for the simplest case
4
👍 1
thank you color 1