DefaultTabController without Scaffold?
问题 I'm trying to use DefaultTabController in the middle of some widgets. So my TabBar could not be in AppBar and has to be down some widgets. So my problem is when I use TabBarView it crashes... So here's an example of Flutter sample but no found how to do it without Scaffold . final List<Tab> myTabs = <Tab>[ Tab(text: 'LEFT'), Tab(text: 'RIGHT')]; Code DefaultTabController( length: myTabs.length, child: Scaffold( appBar: TabBar( tabs: myTabs, ), body: TabBarView( children: myTabs.map((Tab tab)