Open chenjiangmin126 opened 1 year ago
Instead of Get.to you can use Get.off (to remove current page)
Named routes are better to this usecase to. You can set the parameters by route
@jonataslaw Thank you for your reply
I will not close the current page to jump to a new page. Conversely, when opening a new page, can I close the page in the routing record?
For example, pageA ->pageB ->PageC ->PageD Close PageC when I want to open PagE.
@chenjiangmin126 You can achieve this by adding a unique tag on your details page controller. This way every time you open that page, it will create a new instance instead of using the old one.
@LUK3D Yes, my details page controller uses tag I want to close the previously existing page if I repeatedly open it. For example, my controller tag is, detail 1 -> detail 2 -> detail_ 3 When I was at detail_3 Open the detail1, the first detail The details page for 1 closes. Reopen a detail_1 Page
Describe I want to know about routing management. How to achieve this requirement? There are scenarios where multiple product details are opened during app operation. I have multiple product detail pages, and each product detail page will have an ID passed as a parameter. "I want to delete the old page and reopen a new one when the product page with this ID was previously opened.". If the product ID does not exist in the routing record. Open a new page directly.
Currently, I set different "tag" for the controller when routing jumps. But they keep opening a new page, even when the “tag” are the same, My goal is to close the previously opened page when the “tag” is the same
example:
Flutter Version: 3.3.3
Getx Version: 4.6.5