Flutter avoid persistent state management in bottom navigation bar

Viewed 132

I'm using the library persistent_bottom_nav_bar and I settled the stateManagement option equals to false because in a page I want to use a future builder each time that I enter the page.

The problem is that the future builder is not called anymore, or It is called but the page is still with the previous state.

This is my PersistentTabView:

PersistentTabView(
  context,
  screens: _NavScreens(),
  items: _navBarsItems(),
  confineInSafeArea: true,
  backgroundColor: Colors.white,
  handleAndroidBackButtonPress: true,
  resizeToAvoidBottomInset: true,
  hideNavigationBarWhenKeyboardShows: true,
  hideNavigationBar: false,
  stateManagement: false,
  decoration: NavBarDecoration(
    border: Border(top: BorderSide(color: Colors.grey, width: 0.5))
  ),
  popAllScreensOnTapOfSelectedTab: true,
  navBarStyle: NavBarStyle.style6,
),

In the example the first time that I enter in the page the future builder is called and the list appears. If I change screen and I go back in the previous screen the future builder is not working.

Example: https://imgur.com/a/jJWJPvU

0 Answers
Related