【发布时间】:2020-04-23 21:00:00
【问题描述】:
喜欢这个:
下面的代码会在TabBar底部添加Indicator:
DefaultTabController(
length: 2,
child : new TabBar(
labelColor: Colors.purple,
indicatorColor: Colors.purple,
indicatorSize: TabBarIndicatorSize.label,
unselectedLabelColor: Colors.black,
tabs: [
new Tab(icon: Icon(Icons.chrome_reader_mode),),
new Tab(icon: Icon(Icons.clear_all),),
]),
);
但我需要在TabBar 之上使用Indicator。我认为构建自定义标签栏不是一个好主意,因为我不想为这个简单的事情做很多工作。
【问题讨论】:
-
这可能很晚了-但您可以查看这篇文章medium.com/swlh/…
标签: flutter