Skip to content
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 Navigation State Not Retained on Back to "Navigation" Tab #3114

Open
bennajah opened this issue May 29, 2024 · 3 comments
Open

Nested Navigation State Not Retained on Back to "Navigation" Tab #3114

bennajah opened this issue May 29, 2024 · 3 comments
Assignees

Comments

@bennajah
Copy link

ATTENTION: DO NOT USE THIS FIELD TO ASK SUPPORT QUESTIONS. USE THE PLATFORM CHANNELS FOR THIS. THIS SPACE IS DEDICATED ONLY FOR BUGS DESCRIPTION.
Fill in the template. Issues that do not respect the model will be closed.

Describe the bug
A clear and concise description of what the bug is.

Reproduction code
NOTE: THIS IS MANDATORY, IF YOUR ISSUE DOES NOT CONTAIN IT, IT WILL BE CLOSED PRELIMINARY)

To Reproduce
Steps to reproduce the behavior:

  1. Open the App:
  2. Navigate to the Products Screen
  3. Select a Product
  4. Switch to Another Tab
  5. Return to the Products Screen

Expected behavior
When navigating to a product detail page from the products screen, and then switching to another tab in the bottom navigation bar, returning to the products screen should keep the product detail page active. The product detail page should only be reset when the "Products" tab in the bottom navigation bar is pressed again.

Screenshots

Recording.2024-05-29.220456.mp4

Flutter Version:
3.22.1

Getx Version:
5.0.0-release-candidate-6

Describe on which device you found the bug:
all

Minimal reproduce code
https://github.com/jonataslaw/getx/tree/master/example_nav2

@hightman
Copy link

At the moment, its configuration is like this, only the logical page stack is maintained, and it does not remember the history page stack.

@hightman
Copy link

Now you can refer to my sample code, which has implemented page state preservation.

https://github.com/hightman/getx5-example_nav2

@WaniAthar
Copy link

WaniAthar commented Jun 4, 2024

Flutter version 3.22
GetX version 4.6.6

Had the same issue,
Screen1 >> Screen2 >> Screen3
while getting back to Screen1 this error came up

══════ Exception caught by scheduler library ═════════════════════════════════
The following assertion was thrown during a scheduler callback:
setState() called after dispose(): OverlayState#495c2(lifecycle state: defunct, entries: [OverlayEntry#1b469(opaque: true; maintainState: false), OverlayEntry#d1b03(opaque: false; maintainState: true), OverlayEntry#6a4a3(opaque: false; maintainState: false), OverlayEntry#12e78(opaque: false; maintainState: true)])

used Stock Navigator to push the Screen3 and this resolved the issue.
however this is a hacky fix

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants