Why showModalBottomSheet not full width in vertical fold display?
It also not full height in horizontal fold display, it will show the bottomSheet from center to top.Looks like the 'fold' limit its width/height
showModal(context, size) {
showModalBottomSheet(
enableDrag: true,
isScrollControlled: true,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(40.0),
),
context: context,
builder: (BuildContext context) {
return Container(
height: size.height * 0.8,
width: size.width,
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.only(
topRight: Radius.circular(40.0),
topLeft: Radius.circular(40.0),
),
),
child: SizedBox(),
);
});
}
TextButton(
onPressed: () {
showModal(context, size);
},
child: Text(
'Show Modal',
style: TextStyle(color: Colors.black),
))
