一个显示水平选项卡的Material Design widget。
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,
})3 常用属性
tabs = <Tab>
Tab(text: "Tab1",),
Tab(text: "Tab2",),
,
isScrollable: false,
indicatorColor: Color(0xffff0000),
indicatorWeight: 1,
indicatorPadding: EdgeInsets.only(bottom: 10.0),
indicatorSize: TabBarIndicatorSize.tab,
labelColor: Color(0xff333333),
labelStyle: TextStyle(
fontSize: 15.0,
),
labelPadding: EdgeInsets.only(left: 20),
unselectedLabelColor: Color(0xffffffff),
unselectedLabelStyle: TextStyle(
fontSize: 12.0,
),
edgeInsets是Widget的配置类,允许文本方向感知分辨率。
提供的配置方法:
EdgeInsets.fromLTRB(double left, double top, double right, double bottom)
EdgeInsets.all(doube value)
EdgeInsets.only(top:0,right:0,bottom:0,left:0)
EdgeInsets.symmeric(vertical:0,horizontal:0),
原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。
如有侵权,请联系 cloudcommunity@tencent.com 删除。
原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。
如有侵权,请联系 cloudcommunity@tencent.com 删除。