我使用了isScrollControlled: true
和SingleChildScrollView
小部件。.打开键盘时如何打开整张纸?
onPressed: () {
showModalBottomSheet(
context: context,
builder: (BuildContext context) {
return BottomSheet(
camera: camera,
subPost: widget.subPost
);
},isScrollControlled: true);
},
BottomSheet类
class _BottomSheetState extends State<BottomSheet> {
@override
Widget build(BuildContext context) {
return
SingleChildScrollView(
child:
Container(
child: Padding(
padding:
EdgeInsets.only(bottom: MediaQuery.of(context).viewInsets.bottom),
child: Column(
我的输出
答案 0 :(得分:0)
您的屏幕没有滚动,因为您的底页没有 可滚动。
尝试以下代码:
showModalBottomSheet(
context: context,
isScrollControlled: true,
...