-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Nested pages onWillPop handling #10
Comments
Thank you for the compliments and thank you for reaching out to me. If I understand correctly, you want to use a This is possible. How I am assuming you are returning true, even though you handle the back event. Returning false from the Now for the hot reload part, I believe I didn't get the problem exactly. It is unlikely that it is about this package. It is either about the framework or about your code. I hope this solves your problem. Have a great day. |
Hi and thank you for the quick and thorough response as usual ! I heard you when you said that the hot reload (rebuild) part shouldn't have to do with the package but rather either my code or the framework , so I tried to reproduce the issue in a sample project only containing BottomNavLayout and a simple WillPopScope and unfortunately the problem persisted here is the code : Steps to reproduce :
Am I doing something terribly wrong or is this a framework/package issue ? |
I will look into this when I get the chance. |
Hey bro , I was wondering if you've managed to find some time for the issue in fact we're getting closer to the production phase of our app and sadly the functionality that is currently problematic to implement seems to be of high importance to the app flow ie : being able to switch from page to page with PageStack.push() (which needs setstate to take effect) without breaking the global on WillPopScope feature as shown in the sample code. Many thanks ! |
I am sorry but I am away from home for a little while longer. I wish I could help sooner. What I am wondering is that, how does an issue that only come up when hot reloaded affect your production environment? Or am I am missing something? |
No worries man things can wait , thank you for the concern. |
Hey bro , I take it that you could reproduce the issue in discussion , how complicated do you deem it to be ? and based on that would it be possible to estimate the time for resolution ? I'm open for any kind of workaround meanwhile if there is any. |
Okey. I will finally look at this properly. I will keep you updated. Meanwhile, could you contact me on Discord via ViraL#2868? I do not want to flood this issue. |
Hello , I'm back here after being stuck with an issue for a while , the problem im facing is that using willPopScope on top of the BottomNavLayout in order to control what happens when the android back button is pressed , makes it impossible of taking advantage of willPopScope again in the nested screens locally , I'm having few scenarios where I need to dismiss a sheet or an overlay on back btn press but instead the global willPopScope gets triggered and the local screen's one doesn't ! I noticed that if I hot reload (global willPopScope get's rebuilt) the local willPopScope starts triggering but the drawback is that the BottomNavLayout breaks completely with a "Bad state: No element" error , I tried using a state management solution to get the sheet controller into the global willPopScope and control it from there but it meant that it needs to be rebuilt but leads to BottomNavLayout breaking again !
I think this is more like a flutter issue , i've been looking into this thread : flutter/flutter#47088
but don't you find it weird that the BottomNavLayout has to into "Bad state: No element" just for it getting rebuilt by a simple hot reload ?
Thank you again for this great package man !
The text was updated successfully, but these errors were encountered: