good day bosses, i have tried all that was written above but did not work so what solved it for me was the scrollControlDisabledMaxHeightRatio parameter of the showModalBottomSheet function. its set to 9/16 by default, I then change it to 8/10, like this:
showModalBottomSheet(
scrollControlDisabledMaxHeightRatio: 8 / 10,
enableDrag: false,
context: context,
builder: (context) => SingleChildScrollView(
child: Padding(
padding: EdgeInsets.only(
bottom:MediaQuery.of(context).viewInsets.bottom),
child: YourWidget(),
)),
);