小编Ale*_*ett的帖子

如何在Flutter中为标签栏创建未选择的指示器

我使用装饰器为标签栏创建了一个自定义指标。我想为选项卡栏中未选中的选项卡创建一个未选中的指示器。

我做了一个具有自定义装饰的容器,但是当前选择的指示器落后于容器装饰。

new TabBar( 
labelColor: Colors.black,
unselectedLabelColor: Colors.grey,
indicator: new CustomTabIndicator(),
tabs: [
new Container(decoration: new CustomTabInactive(),child: Tab(icon: Icon(Icons.person )))])
Run Code Online (Sandbox Code Playgroud)

带未选择指示器的标签栏

tabs android indicator tabbar flutter

7
推荐指数
2
解决办法
744
查看次数

标签 统计

android ×1

flutter ×1

indicator ×1

tabbar ×1

tabs ×1