Flutter TabBar底部去掉下划线

 

 

在界面里面,TabBar有可能不要下划线的需求,看了一下TabBar的文档,并没有隐藏属性

 

const TabBar({
Key key,
@required this.tabs,
this.controller,
this.isScrollable = false,
this.indicatorColor,
this.indicatorWeight = 2.0,
this.indicatorPadding = EdgeInsets.zero,
this.indicator,
this.indicatorSize,
this.labelColor,
this.labelStyle,
this.labelPadding,
this.unselectedLabelColor,
this.unselectedLabelStyle,
this.dragStartBehavior = DragStartBehavior.start,
this.onTap,
})

我们只需要加上下面一行代码就OK了
indicator: const BoxDecoration(),
posted @ 2020-07-08 15:43  Louis~Lu  阅读(4143)  评论(0编辑  收藏  举报