我有一个底部工作表和底部工作表下,我正在管理路由,我的每个屏幕有不同的屏幕大小。我想为每个屏幕更改showModalBottomSheet
的高度。
showModalBottomSheet<void>(
context: context,
isDismissible: true,
//isScrollControlled: true,
elevation: 2.0,
barrierColor: Colors.white.withOpacity(0),
builder: (BuildContext context) {
// double ht = Provider.of<SearchByLocationNotify>(context).getScreenSize;
return SizedBox(
height: MediaQuery.of(context).size.height * 0.5,// currently static height provided
child: PopUpHome());
},
);
了。
在上面的图片中,红色的门廊是showModalBottomSheet
,蓝色是我的孩子,所以我想要红色的部分应该只占蓝色。
发布于 2022-04-29 05:10:32
从构建器返回一个带有mainAxisSize: MainAxisSize.min的列,并将内容放在列小部件中。
https://stackoverflow.com/questions/72052702
复制相似问题