Flutter TabBar组件

const TabBar({
    Key key,
    @required this.tabs,//必须实现的,设置需要展示的tabs,最少需要两个
    this.controller,
    this.isScrollable = false,//是否需要滚动,true为需要
    this.indicatorColor,//选中下划线的颜色
    this.indicatorWeight = 2.0,//选中下划线的高度,值越大高度越高,默认为2
    this.indicatorPadding = EdgeInsets.zero,
    this.indicator,//用于设定选中状态下的展示样式
    this.indicatorSize,//选中下划线的长度,label时跟文字内容长度一样,tab时跟一个Tab的长度一样
    this.labelColor,//设置选中时的字体颜色,tabs里面的字体样式优先级最高
    this.labelStyle,//设置选中时的字体样式,tabs里面的字体样式优先级最高
    this.labelPadding,
    this.unselectedLabelColor,//设置未选中时的字体颜色,tabs里面的字体样式优先级最高
    this.unselectedLabelStyle,//设置未选中时的字体样式,tabs里面的字体样式优先级最高
    this.dragStartBehavior = DragStartBehavior.start,
    this.onTap,//点击事件
  })
THE END
喜欢就支持一下吧
点赞11赞赏 分享
评论 抢沙发
头像
欢迎您留下宝贵的见解!
提交
头像

昵称

取消
昵称表情代码图片

    暂无评论内容