TabBar 設置可滾動:isScrollable: true

appBar: AppBar(
        bottom: TabBar(
            // 設置可滾動
            isScrollable: true,
            controller: _tabController,
            tabs: tabs.map((e) => Tab(text: e)).toList(),
            labelPadding: EdgeInsets.fromLTRB(20.0,.0,20.0,20.0),
            indicatorPadding: EdgeInsets.fromLTRB(20.0,.0,20.0,20.0)
        ),
      ),
相關文章
相關標籤/搜索