顶部tabbar 尺寸和颜色

2019-07-11  本文已影响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: '待付款',

                  ),

                ],

              ),

            ),

          ),

        ),

上一篇 下一篇

猜你喜欢

热点阅读