取消tabBar被激活tab的下划线

  TabBar(
          indicator: const BoxDecoration(),   //取消下划线
        unselectedLabelColor: Colors.black38,       //未被激活样式的颜色
        indicatorColor: Colors.black54,         //被激活的字体颜色
        indicatorSize: TabBarIndicatorSize.label,    //指示器长度和标签长度是一样的
        indicatorWeight: 1.0,       //下划线粗度
          labelColor: Colors.black,
          tabs: <Widget>[
            Tab(child: Text(
              '充电',
              style: TextStyle(
                fontSize: ScreenUtil.getInstance().setSp(38)
              ),
              ),
            ),
            Tab(child: Text(
              '停车',
              style: TextStyle(
                fontSize: ScreenUtil.getInstance().setSp(38)
              ),
              ),
            ),
            Tab(child: Text(
              '用车',
              style: TextStyle(
                fontSize: ScreenUtil.getInstance().setSp(38)
              ),
              ),
            ),
          ],
        ),

  

原文地址:https://www.cnblogs.com/xhrr/p/11399535.html