Skip to content

fix(routing): use HybridHistoryDelegate.state() in RouteAware callbacks#859

Merged
andycall merged 2 commits intomainfrom
fix/issue-855
Feb 14, 2026
Merged

fix(routing): use HybridHistoryDelegate.state() in RouteAware callbacks#859
andycall merged 2 commits intomainfrom
fix/issue-855

Conversation

@CGQAQ
Copy link
Contributor

@CGQAQ CGQAQ commented Feb 13, 2026

Summary

  • RouteAware callbacks (didPop, didPopNext, didPush, didPushNext) in both WebFRouterViewState and WebFState now check for a HybridHistoryDelegate before reading route state, using delegate.state() instead of ModalRoute.settings.arguments when a delegate is set
  • Added a public getter for HybridHistoryModule.delegate so the callbacks can access it
  • Added regression tests covering the fix

Closes #855

Test plan

  • cd webf && flutter test test/src/widget/hybrid_router_delegate_state_test.dart — all 3 tests pass

🤖 Generated with Claude Code

CGQAQ and others added 2 commits February 13, 2026 10:31
HybridRouterChangeEvent bypasses HybridHistoryDelegate.state() and
reads state directly from ModalRoute.settings.arguments. These tests
verify the expected behavior once the fix is applied.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…ks (#855)

HybridRouterChangeEvent was reading state from ModalRoute.settings.arguments,
bypassing the delegate entirely. Now checks for a delegate first so JS-side
useLocation().state returns the correct data when a delegate is set.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@vercel
Copy link

vercel bot commented Feb 13, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
use-case Ready Ready Preview, Comment Feb 13, 2026 2:38am
vue_usecase Ready Ready Preview, Comment Feb 13, 2026 2:38am

Request Review

@andycall andycall merged commit 351d6ba into main Feb 14, 2026
30 of 37 checks passed
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

Successfully merging this pull request may close these issues.

BUG: HybridRouterChangeEvent bypasses HybridHistoryDelegate.state() — uses ModalRoute.settings.arguments directly

2 participants