-
Notifications
You must be signed in to change notification settings - Fork 97
App flashes the initial location prior to actually deep linking to correct route. #139
Comments
The intialRoute isn't overridden with the deep link? Let me take a look. |
I believe I had similar issue, but my problem was with redirection to
Log looks like this (I added
I also found this. There's described exactly this behavior but on iOS platform, and on iOS this behavior is correct. My guess is it works the same on web? |
I'm unable to duplicate the described behavior. deep linking to Screen.Recording.2021-11-10.at.4.04.12.PM.mov |
Interesting, I can see it in your example. debug.mp4release.mp4This is on latest commit in master branch. I'm on Flutter 2.7.0-3.1.pre, if that's anyhow useful. |
to which example are you referring? it doesn't happen in the code you posted above that I can see. |
I'm not OP, I just came to provide more input :) OP used example from here and that's also what I ran and recorded. |
Neither of these videos opens up a new tab and goes to the deep link as described by OP. |
The point of opening a new tab is because this is happening only on "cold start". It's the same as just refreshing. newtab.mp4Here also slowed down so you can see how it exactly matches log messages newtab-slow.mp4 |
I believe I have the same issue. I will describe my use case here. I have an app where the user logs in with Google:
But when I log out the router state in the global @csells maybe you could confirm the issue by printing out the routes that are being handled by the |
What is the issueThis issue is due to the fact that So this is indeed linked only to "cold-start" which can be triggered either by navigating in a new tab or hitting the browser reload button. Why this issue does not always appearThis issue is tricky because it only appears when the number of pages shown by
What is the solutionFortunatly, there is an easy solution: Make
|
should be fixed in v2.2.7. @mlars84 and @lulupointu can you verify? |
It's working as expected in |
I just started re-writing my app's routing to go_router and so far everything is great, docs are great, etc. The only issue I am having is that when attempting to deep link (or even just link to another route at all) the initial location always flashes first when opening a new tab. E.g., initial route is '/login'. Open a new tab and paste in http://localhost:5000/#/inbox for example and login screen will flash before re-directing to '/inbox'. I've re-created this with the example as well.
Take the above code, open a new tab and paste in http://localhost:5000/#/page2 or http://localhost:5000/#/asdf and you will see a flash of the home screen prior to being properly re-directed.
Browser is Chrome 95.0.4638.69 on a Mac OS running 11.6.
The text was updated successfully, but these errors were encountered: