I change my BottomNavigatorBar
to CupertinoTabBar
and it does not compress the current Tab
,
in other words I wouldn't be able to show some information which is at the bottom part of that current tab because CupertinoTabBar
blocks it.
I don't know it is an default behavior for Cupertino
style but I need to solve it. I try to wrap my pages with CupertinoTabView
and/or CupertinoPageScaffold
, both does not work.
Do you have any advice ?
here is my related code :
return CupertinoTabScaffold(
tabBar: CupertinoTabBar(currentIndex: 2, items: [
BottomNavigationBarItem(
icon: Icon(Icons.explore), title: Text('Explore')),
BottomNavigationBarItem(
icon: Icon(Icons.card_travel), title: Text('Adventure')),
BottomNavigationBarItem(
icon: Icon(Icons.search), title: Text('Search')),
BottomNavigationBarItem(
icon: Icon(Icons.map), title: Text('Create Tour')),
BottomNavigationBarItem(
icon: Icon(Icons.person), title: Text('Profile')),
]),
tabBuilder: (context, index) {
switch (index) {
case 0:
return CupertinoTabView(
builder: (context) => ExplorePage(),
);
break;
case 1:
return AdventurePage();
break;
case 2:
return CupertinoTabView(
builder: (context) => SearchTourPage(),
);
break;
case 3:
return BasicRouteInfoForm();
break;
case 4:
return ProfilePage();
break;
default:
return SearchTourPage();
}
},
);