如果我对您的理解正确,以下代码应可使应用程序栏在滚动时隐藏,而TabBar仍可见:
new Scaffold( body: new NestedScrollView( controller: _scrollViewController, headerSliverBuilder: (BuildContext context, bool innerBoxIsScrolled) { return <Widget>[ new SliverAppBar( title: new Text(widget.title), pinned: true, floating: true, forceElevated: innerBoxIsScrolled, bottom: new TabBar( tabs: <Tab>[ new Tab(text: "STATISTICS"), new Tab(text: "HISTORY"), ], controller: _tabController, ), ), ]; }, body: new TabBarView( children: <Widget>[ new StatisticsPage(), new HistoryPage(), ], controller: _tabController, ), ),);示例来自于。这篇文章.



