I have a listview in the main scaffold, and I added a gesturedetector in the items to display a bottomsheet for item details. The issue is that the content starts in the middle of the sheet.
this is how the code for the sheet:
showModalBottomSheet(
context: context,
builder: (context) => SizedBox.expand(
child: DraggableScrollableSheet(
builder: (BuildContext context, ScrollController scrollController) {
return Container(
color: Colors.red,
child: ListView.builder(
itemCount: 2,
itemBuilder: (BuildContext context, int index) {
return ListTile(title: Text('text'));
},
),
);
},
),
),
);
How can I make the contents of the sheet to start at the top? I have tried enclosing the listview with Align class and set the alignment to topcenter but same result.
