显示键盘时如何隐藏CupertinoTabBar。当前,整个屏幕向上移动,并且标签栏位于键盘上方。
Widget build(BuildContext context) {
usermodel = Provider.of<UserModel>(context);
return CupertinoTabScaffold(
tabBar: CupertinoTabBar(
backgroundColor: Colors.white54,
items: const <BottomNavigationBarItem>[
BottomNavigationBarItem(
icon: Icon(CupertinoIcons.search),
title: Text('search'),
),
BottomNavigationBarItem(
..
),
],
),
tabBuilder: (BuildContext context, int index) {
switch (index) {
case 0:
return CupertinoTabView(
navigatorKey: firstTabNavKey,
builder: (BuildContext context) => JobsList(),
defaultTitle: 'search',
);
break;
case 1:
...
break;
}
return null;
},
);
}