Milad-Akarie / auto_route_library

Flutter route generator
MIT License
1.59k stars 405 forks source link

popscope(canPop:false) doesn't prevent gesture back when using nested route #2023

Open choim4389 opened 3 months ago

choim4389 commented 3 months ago

PopScope(canPop:false) doesn't prevent gesture back when using nested route. It only prevent AppBar backbutton.(AutoLeadingButton).

If I change to Not nested route, It also prevent gesture back.

I'm using auto_route 9.2.0.

nexusc0re91 commented 2 months ago

Currently the issue also occurs in our application since Flutter 3.24 @Milad-Akarie. Do you have a solution? Or any advice?

ezamagni commented 2 months ago

Also happening in our application, this is a very serious issue for us. Flutter 3.19.6 Autoroute 8.1.3 Autoroute generator 7.3.2

xVemu commented 2 months ago

It seems Flutter 3.24 broke this

mevljas commented 2 months ago

I'm not sure what is causing this, but PopScope(canPop:false) is in our case triggered only once. The next time it just closes the whole app. We started noticing this after the last Flutter upgrade.

auto_route 8.3.0 Flutter 3.24.1

nexusc0re91 commented 2 months ago

I can only agree once again. Since Flutter 3.24 with AutoRoute 9.2.0, within a NestedRoute using TabRouters, the app unfortunately closes on Android when using PredictiveBack or the hardware back button. Additionally, in the RootScreen, the PopScope is only executed once, and then the app also closes when pressing back.