YUVRAJ KUMAR SINGH
YUVRAJ KUMAR SINGH

Reputation: 1

screens not rebuilding on tab switching

persistent nav bar not refreshing the screens of the different tabs switching, it should rebuild the widget tree on every switch but it is not doing it please help me....

Scaffold(
      key: _key,
      drawerEnableOpenDragGesture: true,
      body: Builder(
        builder: (context) {
          return PersistentTabView(
            navBarHeight: 60,
            decoration: NavBarDecoration(
              boxShadow: [
                BoxShadow(
                  color: Colors.black.withOpacity(0.2), // Shadow color
                  offset: const Offset(0, -3), // Changes position of shadow
                  blurRadius: 6, // Changes size of shadow
                  spreadRadius: 2, // Changes intensity of shadow
                ),
              ],
            ),
            backgroundColor: Colors.white,
            context,
            screens: screens(),
            items: navBarItems(),
            controller: controller,
            navBarStyle: NavBarStyle.style9,
            popAllScreensOnTapOfSelectedTab: true,
            stateManagement: false,
           
          );
        }
      ),
    );

I was trying to make a rebuild on every switching but it is not working it stays at the same state at which it was left. I also tried making statemanagent to false, but it remains the same..

Upvotes: 0

Views: 35

Answers (0)

Related Questions