NOTE: Im using Navigator.of(context).push to push ModalRoute,

嗨,我有ModalRoute页和TextFormField页的正文,但是当键盘出现时,输入被键盘隐藏了,怎么解决这个问题?

enter image description here

return Container(
      child: ListView(
          children: <Widget>[
            //other widget
            SizedBox(height: _qtyAnimation.value),
            Row(
              children: <Widget>[
                Expanded(
                  child: Text(
                    "Jumlah",
                    style: TextStyle(fontWeight: FontWeight.bold),
                  ),
                ),
                SizedBox(
                  width: 145.0,
                  child: TextFormField(
                    focusNode: _qtyFocusNode,
                    controller: qty,
                    keyboardType: TextInputType.number,
                    textAlign: TextAlign.center,
                    decoration: InputDecoration(
                      contentPadding: EdgeInsets.all(0.0),
                      prefixIcon: IconButton(
                        icon: Icon(Icons.remove),
                        onPressed: () {},
                      ),
                      border: OutlineInputBorder(
                        borderSide:
                            BorderSide(color: Colors.grey, width: 0.1),
                      ),
                      suffixIcon: IconButton(
                        icon: Icon(Icons.add),
                        onPressed: () {},
                      ),
                    ),
                  ),
                ),
              ],
            ),
          ],
    );

这就是我的代码,我try 使用焦点 node 以及更多,结果仍然是一样的 请帮帮我

推荐答案

谢谢用文本字段底部的填充来解决我的问题

    Padding(
             padding: EdgeInsets.only(
             bottom: MediaQuery.of(context).viewInsets.bottom));

和MARE反转表

Flutter相关问答推荐

如何在列表磁贴上添加行

创建后检索FiRestore文档ID

下拉图标未居中

在Flutter 中创建自定义Snackbar类

Flutter 动画列表一次构建所有项目,而不是仅构建可见的项目

如何实现Flutter 梳理机图像的小量移动

在Flutter 小部件测试中找不到框中的AssetImage装饰

使用持久的侧边菜单和顶部栏在Ffltter Web应用程序中的页面之间导航

Flutter守护进程无法启动

我如何在Android 13中通过Flutter应用程序打开文件(不是图像、视频或音频)?

按一下按钮即可更新 fl_chart

网页浏览器不支持鼠标滚动的行项目

我在手机上找不到我的 Flutter 应用缓存数据

如何使这种相机叠加在Flutter 中?

在 Flutter 中使用 HardwareKeyboard 时所有键都没有响应

Show Snackbar above to showModalBottomSheet Flutter

如何将 void 函数放入单独的 dart 文件的单独页面中

如何在 flutter 中制作这种类型的扩展瓦片

带图像封面的 ElevatedButton

如何在 Flutter 中创建类似箭头标签的设计