美文网首页
顶部tabbar 尺寸和颜色

顶部tabbar 尺寸和颜色

作者: 我是数据链路层 | 来源:发表于2019-07-11 17:06 被阅读0次

尺寸和颜色需要各自加一个 PreferredSize 和 Material改变主题色

appBar: AppBar(

          title: Text('订单'),

          elevation: 0,

          bottom: PreferredSize(-------//设置尺寸

            preferredSize: Size.fromHeight(50),

            child: Material(------//改变主题色

              color: Colors.purple,

              child: TabBar(

                unselectedLabelColor: Colors.red,

                tabs: <Widget>[

                  Tab(

                    text: '待付款',

                  ),

                  Tab(

                    text: '待付款',

                  ),

                  Tab(

                    text: '待付款',

                  ),

                  Tab(

                    text: '待付款',

                  ),

                ],

              ),

            ),

          ),

        ),

相关文章

网友评论

      本文标题:顶部tabbar 尺寸和颜色

      本文链接:https://www.haomeiwen.com/subject/piwdkctx.html