I am using Google_Nav_Bar and i didn't know how to put code on the page should i create a new file for everypage? and how to control it?
google_nav_bar: ^5.0.6 here is my code in homepage enter link description here
CodePudding user response:
Please post code using Code Sample
next time. I've never used Google_Nav_Bar
but it looks like you're missing a setState
call.
selectedIndex: _selectedIndex,
onTabChange: (index) {
setState(() {
_selectedIndex = index;
});
CodePudding user response:
Keep in your mind, nav bar is just separate widget (an independence thing). You should change "body" widget when user click on each items in that navbar.