Is it better to use Navigator over BottomNavigationBar when we talk about performance? like is this "bottom navigation bar" not gonna demand more resources, since, in Navigator.pop, the route will removed from the memory, but with the BottomNavigationBar all routes will be stored in the memory and just display the index we want? am I correct?
Asked
Active
Viewed 46 times
1 Answers
0
BottomNavigationBar
just executes a function when you tap on a tab—how the tabs are implemented is up to you.
With an IndexedStack
, every child is built when shown, and visibility is simply toggled when the index changes.
You can also use AutomaticKeepAliveClientMixin
if you want to preserve a State when changing tabs, without building them all at once.
If you want the tabs to be disposed, you don't need to use either of these. Simply build the body of the page depending on the index of the BottomNavigationBar
.

CoocooFroggy
- 121
- 6