I am developing an app using Flutter for the web. I was able to change the URL according to the tapped bottom navigation item. For example, if I have Home, Profile, and Settings in the navigation bar, the URL switches to /home, /profile, and /settings accordingly. However, the problem I am facing right now is the reverse: if I directly enter the URL (e.g., http://localhost:8080/profile), it navigates to the profile screen, but the highlighted tab remains the first index, which is Home.
In my router, I use GoRoute and StatefulShellBranch. Has anyone encountered this issue before and managed to solve it? If so, could you please share your solutions with me? Thank you!