The Navigation Stack:
struct RootView: View {
@StateObject private var router = Router()
var body: some View {
NavigationStack(path: $router.path) {
Color.clear
.navigationDestination(for: Route.self) { route in
switch route {
case .launch:
LaunchScreen()
.onAppear { router.decideInitialFlow() }
.navigationBarBackButtonHidden(true)
case .onboarding:
OnboardingView(viewModel: OnboardingViewModel(finish: router.finishOnboarding))
.navigationBarBackButtonHidden(true)
}
}
}
}
}
The problem is:

