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

[go_router] add current state getter #7651

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

cedvdb
Copy link
Contributor

@cedvdb cedvdb commented Sep 15, 2024

Adds a current state getter that returns GoRouterState.

I've no idea if this is correct but the added tests seem to be passing. Rebuilding the state may be expensive too ?

Fix: flutter/flutter#129833

Pre-launch Checklist

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

@cedvdb cedvdb changed the title [go_router] add current state getter [draft][go_router] add current state getter Sep 15, 2024
@cedvdb cedvdb changed the title [draft][go_router] add current state getter [go_router] add current state getter Sep 15, 2024
Copy link
Contributor

@chunhtai chunhtai left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This can also solve flutter/flutter#129833

Edit: nvm you already linked the issue

packages/go_router/lib/src/delegate.dart Show resolved Hide resolved
packages/go_router/test/go_router_test.dart Show resolved Hide resolved
packages/go_router/lib/src/delegate.dart Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[go_router] Come up with a better way to get the current location without context
2 participants