小编And*_*oud的帖子

禁用在TabBar颤动中滑动选项卡

您好我在Flutter中有一个标签栏,我想禁用标签之间的滑动

      // Set the bottom navigation bar
      bottomNavigationBar: new Material(

        // set the color of the bottom navigation bar
        color: const Color(0xFFF7F7F7),
        // set the tab bar as the child of bottom navigation bar
        child: new TabBar(
          tabs: <Tab>[
            new Tab(
              // set icon to the tab
              icon: new Icon(Icons.home,color: Colors.black),
            ),
            new Tab(
              icon: new Icon(Icons.favorite,color: Colors.black),
            ),
            new Tab(
              icon: new Icon(Icons.search,color: Colors.black),
            ),
            new Tab(
              icon: new Icon(Icons.settings,color: Colors.black),
            ),
          ],
          // setup the controller
          controller: controller, …
Run Code Online (Sandbox Code Playgroud)

flutter

26
推荐指数
2
解决办法
7201
查看次数

标签 统计

flutter ×1