Basicly i’m a junior programmer, i have never seen error like this. i’m always doing what it should does.Please i’m new in world of programmer, i wish someone can help me and teach what should i do
so, it a willPopScope error i don’t know where it is erroring but, i did solve agai and again but it isn’t working. Can someone looking for a error
i wish. I can more to learn about how many lesson shoul i learn. Please give me many lesson to improve myself
2
Answers
https://docs.flutter.dev/release/breaking-changes/android-predictive-back
According to this.
To support Android 14’s Predictive Back feature, a set of ahead-of-time APIs have replaced just-in-time navigation APIs, like WillPopScope and Navigator.willPop.
The PopScope class directly replaces WillPopScope.
The old code we used before:
Code after migrating:
The error message "WillPopScope assumes immediate disposal on route change" means that the WillPopScope widget is being disposed of before the route change has finished completing. This can happen if you are using the WillPopScope widget in a route that is being popped, and the WillPopScope callback is taking a long time to complete.
To fix this error, you need to make sure that the WillPopScope callback completes before the route change is finished completing. You can do this by either making the callback complete more quickly, or by using a different approach to preventing the user from exiting the screen.
you can try this
OR