0

I am currently switching the routing in my flutter web app to use GoRouter, everything works fine but when I try to use a deep link, for example: localhost:68234/#/sessions/e0705f4b-1b1f-4817-9218-0821aa7c6eec The URL goes to the correct page and everything is displayed correctly according to the path parameter with the correct session id, but then after about a second the URL reverts to localhost:68234/#/.

A few things I noticed:

  1. The page being loaded returns a FutureBuilder in the build method, and as the snapshot is connection state is waiting I display a CircularProgressIndicator, while that is being displayed the URL is correct, but once it finishes building and displays the actual content of the page, the bug happens.
  2. While logging the GoRouter.of(context).location in multiple places as the page is loaded amongst its different components, the correct URL is printed every time.
  3. When navigating to the given URL using normal navigation through my app, the bug doesn't occur.
Ahmed
  • 43
  • 7

0 Answers0