How to combine flutter_wizard with go_router to pop to a previous step?

23 views Asked by At

i currently build an app that contains a flow of multiple steps.

- Screen A
 - ...
- Screen B
 - Flow
  - Wizard Screen 1
  - Wizard Screen 2
  - Wizard Screen 3
  - ...
 - ...
- Screen C
 - ....
- ...

They should be arranged in a wizard way. So we want to have a static tool bar that updates its content according to the currently shown step in the flow. I found https://pub.dev/packages/flutter_wizard to be useful. But when i try to navigate from step two back to step one the router pushes me out of the entire flow back to the entry point. As a router i use https://pub.dev/packages/go_router.

So far i could not find any clues how to tackle this. I was thinking about defining the individual steps of the flow as routes on the navigation router. But not sure how the libraries get along.

Worst case: I would have to ditch the wizard library and implement the flow as individual screens that each come with their own tool bar.

0

There are 0 answers