in my app I currently have a Router Navigation for my basic outer structure to navigate between my login screen, my registration screen and my LoggedIn-Screen (which is the inner part of my app):
In my LoggedInPage I navigate between different pages with a PageControl.
This page also has a PageIndicator docked at the bottom which is my menu bar:
As you can see, the PageControl contains three different pages: map, another page and profile.
The other page contains a Navigator with a PoiListPage and a DetailViewPage because I want to be able to click an element in my PoiListPage which leads me to more details on the DetailViewPage.
This is all working fine.
But I am currently stuck on the PageIndicator.
As soon as I open an element in the PoiListPage (so that the page changes to DetailViewPage) the specific button in the PageIndicator is not linking to the PoiListPage any more but to the DetailViewPage.
I need to lock the link to the DefaultPath of my Navigator.
You are asking a relatively complicated question that the code you’ve added does not illustrate to the extent where it would make sense. Specifically: your PageIndicator is tied to the top-level PageControl, but you’re asking how to lock the “dot” to one of the pages in a nested Navigator, which the PageIndicator has nothing to do with.
It is not possible to help you without seeing a complete, minimal reproduction that we could copy-paste and run.
On the innerPage1, you can navigate to innerPage2 by clicking the red button.
As you can see, there is no turning back to innerPage1 by pressing the PageIndicator.
I am not really fixed to the solution with the PageIndicator.
I was just thinking that this could be the best way to do this.
If there is, in your opinion, a better way to implement this structure, I am open to suggestions.
I would go with Navigator in your case. I replaced PageControl and PageIndicators with only one Navigator with all pages inside. Each button leads to every subpage. From innerPage1 you can navigate to innerPage2. Now if you click Page2 button, you will go back to innerPage1.
Here I used router function getRoute which can retrieve route name and by that, I can navigate to page2 or go back to innerPage1.