packages icon indicating copy to clipboard operation
packages copied to clipboard

[go_router] Fix replace routes hanging the originating completer

Open nouvist opened this issue 7 months ago • 1 comments

The behavior of replace and pushReplacement involves popping the last route and ignoring the completer, leaving the last route's future unresolved. This PR introduces new behavior for both methods to inherit the last route's completer if the last route is an ImperativeRouteMatch.

Expected issue(s) should be fixed by this:

  • https://github.com/flutter/flutter/issues/141251

Previous behavior:

https://github.com/user-attachments/assets/add06187-9bee-4347-8eac-e129c7a53457

This PR behavior:

https://github.com/user-attachments/assets/98c20fe3-5fea-4db2-ae95-747950650172

Pre-Review Checklist

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

[^1]: Regular contributors who have demonstrated familiarity with the repository guidelines only need to comment if the PR is not auto-exempted by repo tooling.

nouvist avatar May 28 '25 09:05 nouvist

@nouvist LGTM, thank you for submitting the fix, I was facing the same issue

ikurek avatar May 30 '25 11:05 ikurek

@nouvist Do you still plan to return to this PR? FYI there are merge conflicts now.

justinmc avatar Aug 19 '25 22:08 justinmc

@nouvist I'm going to close this PR as abandoned, but let me know if you end up getting time to return to it and want to reopen.

justinmc avatar Sep 16 '25 22:09 justinmc