csells / go_router

The purpose of the go_router for Flutter is to use declarative routes to reduce complexity, regardless of the platform you're targeting (mobile, web, desktop), handling deep linking from Android, iOS and the web while still allowing an easy-to-use developer experience.
https://gorouter.dev
441 stars 97 forks source link

Deep linking using query params #239

Closed adiospace closed 2 years ago

adiospace commented 2 years ago

Hi @csells,

ty for the awesome package.

I recently started using go_router on a mobile app and i have some issues with deep linking to a screen using query parameters.

This works:

xcrun simctl openurl booted customscheme://example.com/

Using query parameters doesn't:

xcrun simctl openurl booted customscheme://example.com/?tab=1

# it returns
no matches found: customscheme://example.com/?tab=1

I image this is a pretty useful case. Is there a way to handle deep linking using query params?

Navigating in the app to /?tab=1 is working correctly.

adiospace commented 2 years ago

Oh man!!!

nevermind, I had to quote the url

xcrun simctl openurl booted "customscheme://example.com/?tab=1"
csells commented 2 years ago

I'm glad you figured it out!