简体   繁体   English

打开键盘时如何显示完整的showModalBottomSheet

[英]how to show full showModalBottomSheet when open keyboard

I used isScrollControlled: true and SingleChildScrollView widget..when open keyboard how to open full sheet?我使用isScrollControlled: trueSingleChildScrollView小部件..打开键盘时如何打开整张表?

  onPressed: () {
                              showModalBottomSheet(
                                  context: context,
                                  builder: (BuildContext context) {
                                    return BottomSheet(
                                        camera: camera,
                                      subPost: widget.subPost
                                    );
                                  },isScrollControlled: true);
                            },

BottomSheet class底片 class

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(

My output我的 output

我的输出

I need like this我需要这样我需要这样

your screen is not scrolling, because your bottom sheet is not scrollable.您的屏幕没有滚动,因为您的底部工作表不可滚动。

Try below code:试试下面的代码:

 showModalBottomSheet(
      context: context,
      isScrollControlled: true,
...

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何将 showModalBottomSheet 设置为全高? - how to set showModalBottomSheet to full height? 如何在打开 Dart Flutter showModalBottomSheet 时打开键盘并在键盘上打开 textFormField hover? - How to make keyboard open and textFormField hover over keyboard while opening Dart Flutter showModalBottomSheet? 当为 showModalBottomSheet 显示键盘时出现 PersistentTabView - PersistentTabView coming up when keyboard is shown for showModalBottomSheet 如何在 showModalBottomSheet 的左侧、右侧和底部显示边距? - How to show margin on left, right and bottom of showModalBottomSheet? Flutter - 当键盘出来时,ShowModalBottomSheet 没有 go 向上 - Flutter - ShowModalBottomSheet does not go up when the keyboard comes out 当我在 showModalBottomSheet 或 showDialog 中使用表单时,键盘没有出现 - The keyboard is not coming up when I use a Form in a showModalBottomSheet or showDialog showModalBottomSheet 显示,但 showBottomSheet 不显示 - showModalBottomSheet is show, but showBottomSheet not show Flutter 在退出 showModalBottomSheet 并再次显示 showModalBottomSheet 时无法保留有状态的 state - Flutter can't preserve stateful state when exit showModalBottomSheet and show showModalBottomSheet again Flutter - 如何将 showModalBottomSheet 设置为全高但低于状态栏? - Flutter - How to set showModalBottomSheet to full height but below status bar? 如何使用 Navigator.of(context).pushNamed 显示 function showModalBottomSheet 或 showDialog? - How to use Navigator.of(context).pushNamed to show function showModalBottomSheet or showDialog?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM