Reputation: 51
I use the flutter function showmodalbottomsheet to display a page with a customscroll view.
But I have a problem when the scroll of the scrollview is overscrolling I wanted to scroll the the bottomsheet instead of overscrolling the customscrollview.
How can I choose which scroll I want to use?
for example I want to do like Facebook commentary page:
Upvotes: 5
Views: 6364
Reputation: 450
What you probably need is DraggableScrollableSheet
.
showModalBottomSheet(
isScrollControlled: true,
context: context,
builder: (context) => DraggableScrollableSheet(
builder: (context, scrollController) => SingleChildScrollView(
controller: scrollController,
child: Column(
children: [
Container(
color: Colors.purple,
height: 100,
),
Container(
color: Colors.orange,
height: 300,
),
Container(
color: Colors.black,
height: 300,
),
],
),
),
),
),
(I was also looking for an answer when I stumbled upon your question, decided to share the results of my research :) hope it helps you!)
Upvotes: 5