Open ThanhTuNguyen opened 2 years ago
also looking for something like this, going back to previous page to lessen additional state checking.
also looking for something like this, going back to previous page to lessen additional state checking.
yes, this must be very simple and easy in navigation 1.0. But extremely annoying in Navigation 2.0, is this the downside of this?
I think you should maintain the search filters and results in the state (cubit for example) and when you go back the state would be the same..
Hope this can help you
I think you should maintain the search filters and results in the state (cubit for example) and when you go back the state would be the same..
Hope this can help you
Yes. I already did it, but it seem over complicated and frustrated if i just can do something like "navigation.pop" in Nav 1.0
To do something like "navigation.pop()" you should only need to update your state.
In your case your could have something like this
To go back update state and set itemSelected == null, also you can use WillPopScope to override physical back button behavior
Hi, I usually struggle with situations like this. I had a searching view with a bunch of options and filters. I do search with those options, the results just appear, i can scroll a little bit and chose the right item which i looking for, click on this item to reveal more detail on another page ... then i go back. All i want is the searching page is remain, with the same options and filter even the position of items in list view.
So i had to store all those options, filter, and search it all again through API (or store the last results in State). it's frustrated for me when i simply just use "Navigatior.pop" in Nav 1.0.
Please correct me if there is actually a way to back previous page as simple as Navigator.pop or any trick.
Or can you make a feature like this? It very useful