isDismissible: true, //not work
showDragHandle:true, //is outside BottomSheet container
this two feature dont worked for this bottomsheet
void _showBottomSheet(BuildContext context) {
showModalBottomSheet<void>(
context: context,
isScrollControlled: true,
isDismissible: true,
showDragHandle:true,
backgroundColor: Colors.transparent,
builder: (BuildContext context) {
return DraggableScrollableSheet(
initialChildSize: 0.5,
maxChildSize: 0.7, // Set the maximum height to 70% of the screen height
minChildSize: 0.2,
expand: false,
builder: (BuildContext context, ScrollController scrollController) {
return Container(
color: Colors.white, // Background color of the bottom sheet
child: SingleChildScrollView(
controller: scrollController,
child: Column(
children: [
// Your content here
],
),
),
);
},
);
},
);
}
By Default the isDismissable: true check the documentation [https://api.flutter.dev/flutter/material/showModalBottomSheet.html] Also check how do you use this function