0

I have 5 signup screens, and I want to allow user t go back to each screen until signup completed and navigate to home. When navigating to home, I want to clear all previous screen. So on home, if user is pressing back button, it should exit the app.

Signup1<-> signup2<-> signup3<-> signup4<-> signup5-> home, back press exit the app. <-> means user can go back to previous screen by pressing back button, until home reached.

And what if I want to clear upto signup3 only. Means if user back press on home, it should land on signup2.

What i am looking for is pushnamedandremoveuntil like functionality but in go router. I know there is no imperative api for this in gorouter, but how can we do it manually.

0 Answers0