A new Flutter project.
This project is a starting point for a Flutter application.
basic structure of this widget is
DraggableScrollableSheet(
initialChildSize: , // range between 0.0 - 1.0
minChildSize: , // range between 0.0 - 1.0
maxChildSize: , // range between 0.0 - 1.0
builder: (context, scrollController) {
// return Widget;
},
);
We can use any widget as a child of DraggableScrollableSheet
widget
a perfect example is to use ListView
as a child
builder: (context, scrollController) {
return Container(
child: ListView(
physics: const BouncingScrollPhysics(),
controller: scrollController, // enables scrolling
children: [
// ...
],
),
);
}
It is usefull to wrap DraggableScrollableSheet
with a dContaner
and a Stack
widget like:
Stack(
children: [
// ....
Container(
decoration: BoxDecoration(
// ...
),
child: DraggableScrollableSheet(
// ...
),
),
],
),