Build tab system navigation like web browser
I want to build a tab system similar to web browser in Flutter. At the start of the app, we can only a home tab, on which we can open new tabs. These tabs can be then deleted, like web browser tabs.
Why are the Parent pages created at the moment when I to child route in flutter?
I am using navigator 2.0 with GoRouter.I found that in the widget tree When I go to a child route all the parent of that route are also created and their build method also triggered. Why is that?. Shouldn’t those parent page be created when I actually go back.Similarly, when I push a new route without popping the old route the previous route is still there in the widget tree. Isn’t this waste of memory to keep the state of the old page in memory when that page is not even visible?