相关疑难解决方法(0)

如何在颤动的选中和未选中状态下更改选项卡图标的颜色?

我想在选项卡中定义图标的未选择颜色,就像unselectedLabelColor一样。

  TabBar(
          indicatorColor: Colors.grey,
          labelColor: Colors.black,
          unselectedLabelColor: Colors.grey,
          tabs: [
            Tab(
                text: 'first',
                icon: Icon(Icons.directions_car, color: Colors.grey)),
            Tab(
                text: 'second',
                icon: Icon(Icons.directions_transit, color: Colors.grey)),
            Tab(
                text: 'third',
                icon: Icon(Icons.directions_bike, color: Colors.grey)),
          ],
        )
Run Code Online (Sandbox Code Playgroud)

flutter

4
推荐指数
5
解决办法
3356
查看次数

标签 统计

flutter ×1