Is it possible to not preserve the state of specific screen in flutter

Viewed 16

I have bottom navigations in my app it works well to maintain state of each screen/tabs using Offstage with stack. but for specific screen I want to not maintain the state and want to rebuild the screen when click on that nav/tab

return Offstage(
      offstage: !isSelected,
      child: TabNavigator(
        navigatorKey: navigatorKeys[selectedNav]!,
        nav: selectedNav,
      ),
    );
0 Answers
Related