相关疑难解决方法(0)

如何在标签栏指示器中给出渐变线

我有一个标签栏功能,我在其中显示一个甜甜圈图和车辆列表,但我需要显示用户选择的标签我在 TabBar 中有指标颜色,但我需要填充渐变线,如图所示,请帮助我出去。

PS:如果可能的话,请让我知道如何给主题颜色意味着主色中的主色作为渐变???

return Scaffold(
    body: new DefaultTabController(
        length: 2,
        child: new Column(
          children: <Widget>[
            new Container(
              width: 1200.0,
              child: new Container(
                color: Colors.white,
                child: new TabBar(
                  labelColor: Colors.black,
                  tabs: [
                    Tab(
                      child: new Text("Visual",
                      style: new TextStyle(fontSize: 20.0)
                      ),
                    ),

                    Tab(
                      child: new Text("Tabular",
                      style: new TextStyle(fontSize: 20.0)), 
                    ),
                  ],
                ),
              ),
            ),
            new Expanded(
              child: new TabBarView(
                children: [
                  Tab(
                    child: new RefreshIndicator(
                      child: new Text('DONUT CHART'),
                      onRefresh: refreshList,
                      key: refreshKey1,
                    ),
                  ),
                  Tab(
                    child: new RefreshIndicator( …
Run Code Online (Sandbox Code Playgroud)

android dart flutter

5
推荐指数
2
解决办法
3424
查看次数

标签 统计

android ×1

dart ×1

flutter ×1