How to make whole screen scrolling instead of just ListView scrollable?
return CustomScrollView(
slivers: [
SliverAppBar(
actions: [
....
],
),
SliverFillRemaining(
child: Column(
children: [
_showWidget(context, state.tenancy),
TabBar(
unselectedLabelColor: Colors.black,
labelColor: Colors.red,
tabs: const [
Tab(
icon: Icon(Icons.people),
),
Tab(
icon: Icon(Icons.person),
)
],
controller: _tabController,
indicatorSize: TabBarIndicatorSize.tab,
),
Expanded(
child: TabBarView(
controller: _tabController,
children: [
Text("Tab A"),
ListView.builder(
shrinkWrap: true,
itemCount: 100,
itemBuilder: (context, index) {
return Text("efff");
})
})),
],
)),
],
)),
2
Answers
Try adding
physics: NeverScrollableScrollPhysics()
to yourListView.Builder
.You can use
bottom
parameter forTabBar
Now you can just use the column or ListView with
NeverScrollableScrollPhysics
. There might be a better way instead of usingNeverScrollableScrollPhysics
.