Skip to content

Conversation

@chunhtai
Copy link
Contributor

…ally complete imperative page.

fixes flutter/flutter#123369

Pre-launch Checklist

  • I read the Contributor Guide and followed the process outlined there for submitting PRs.
  • I read the Tree Hygiene wiki page, which explains my responsibilities.
  • I read and followed the relevant style guides and ran the auto-formatter. (Unlike the flutter/flutter repo, the flutter/packages repo does use dart format.)
  • I signed the CLA.
  • The title of the PR starts with the name of the package surrounded by square brackets, e.g. [shared_preferences]
  • I listed at least one issue that this PR fixes in the description above.
  • I updated pubspec.yaml with an appropriate new version according to the pub versioning philosophy, or this PR is exempt from version changes.
  • I updated CHANGELOG.md to add a description of the change, following repository CHANGELOG style.
  • I updated/added relevant documentation (doc comments with ///).
  • I added new tests to check the change I am making, or this PR is test-exempt.
  • All existing and new tests are passing.

If you need help, consider asking for advice on the #hackers-new channel on Discord.

@chunhtai
Copy link
Contributor Author

cc @NazarenoCavazzon

@NazarenoCavazzon
Copy link
Contributor

Like I said in the issue, the problem is when popping a Dialog with context.pop() it completes the completer of the last pushed route from go_router, the problem is that the showDialog() method don't pushes routes using go_router, it uses navigator 1.0 to do so. Using go_router also to pop Dialogs doesn't make sense, because you lose the feature of popping a value integrated in Navigator 1.0.

image

@NazarenoCavazzon
Copy link
Contributor

Is there a way to know from the last context if the current route was pushed using Navigator 1.0?

@chunhtai
Copy link
Contributor Author

Router API is meant to be backward compatible, the GoRouter is also built to support both Navigator API and router API. The pop is also responsible to handle android backbutton, and it is not possible to know whether the pop will be dismissing the a pageless route or page based route created by RouteMatchList.

@chunhtai chunhtai added the autosubmit Merge PR when tree becomes green via auto submit App label Apr 5, 2023
@auto-submit auto-submit bot merged commit a46c025 into flutter:main Apr 5, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Apr 6, 2023
nploi pushed a commit to nploi/packages that referenced this pull request Jul 16, 2023
flutter#3613)

[go_router] Fixes an issue when popping pageless route would accident�
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

autosubmit Merge PR when tree becomes green via auto submit App p: go_router

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[go_router]: Bad state: Future already completed on context.pop()

3 participants