我使用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(
我的输出
我需要这样
最佳答案
your screen is not scrolling, because your bottom sheet is not scrollable.
尝试以下代码:
showModalBottomSheet(
context: context,
isScrollControlled: true,
...
关于flutter - 打开键盘时如何显示完整的showModalBottomSheet,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58218676/