showSheet() {
showModalBottomSheet(
context: context,
isScrollControlled: true,
builder: (BuildContext context) {
return FractionallySizedBox(
heightFactor: 0.92,
child: Scaffold(
appBar: AppBar(
actions: [
],
leading: IconButton(
onPressed: () {
Navigator.pop(context);
},
icon: Icon(Icons.close),
iconSize: ScreenAdapter.size(30),
color: Colors.white),
title: Text(""),
centerTitle: true,
backgroundColor: Colors.black38,
),
body: Container(
),
bottomSheet: Container(
)));
});
}
flutter底部弹窗设置指定高度的方法
最新推荐文章于 2024-05-24 18:39:10 发布