Flutter:显示键盘时,如何隐藏CupertinoTabBar导航

时间:2019-07-20 12:28:30

标签: flutter

显示键盘时如何隐藏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;
      },
    );
  }

0 个答案:

没有答案