在较小的设备上的扑面而出溢出底部问题
我的应用程序中有一个警报对话框,它来自 init 元素。该表单由一个列小部件包裹。然而,当键盘打开时,它会引发底部溢出问题。为了解决这个问题,我使用 singlechildScrollview
包装了该列。这解决了这个问题。但是当我在较小的设备中打开相同的内容时,即使使用 singlechildScrollview
包裹,它也会抛出底部溢出错误。目前,该问题存在于较小的设备上。下面给出了代码
Get.defaultDialog(
title: 'Have any Issues?',
titleStyle: Theme.of(Get.context!).textTheme.headline5,
content: SafeArea(
child: SingleChildScrollView(
reverse: true,
scrollDirection: Axis.vertical,
physics: const ClampingScrollPhysics(),
child: Column(
children: [
Padding(
padding: EdgeInsets.only(bottom:bottom),
child: Text(
paymentIssueMessage,
textAlign: TextAlign.center,
style: Theme.of(context).textTheme.bodyText1,
),
),
const SizedBox(
height: 10,
),
TextFormField(),
TextFormField() // Fields in form
]
)
)
)
如何在较小屏幕设备上解决此问题?
I have a alertdialog in my application which has come form elements init. The form is wrapped with a column widget. How ever when the keyboard opens up it throw bottom overflow issue. To solve that i have wrapped the column using singlechildScrollview
. This solved the issue. But when i opened the same in a smaller device it throws the bottom overflow error even wrapped with singlechildScrollview
. Currently the issue exists on smaller devices. The Code is given below
Get.defaultDialog(
title: 'Have any Issues?',
titleStyle: Theme.of(Get.context!).textTheme.headline5,
content: SafeArea(
child: SingleChildScrollView(
reverse: true,
scrollDirection: Axis.vertical,
physics: const ClampingScrollPhysics(),
child: Column(
children: [
Padding(
padding: EdgeInsets.only(bottom:bottom),
child: Text(
paymentIssueMessage,
textAlign: TextAlign.center,
style: Theme.of(context).textTheme.bodyText1,
),
),
const SizedBox(
height: 10,
),
TextFormField(),
TextFormField() // Fields in form
]
)
)
)
How can I solve this issue on smaller screen devices??
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
添加灵活的小部件或扩展的小部件,如下所示。
Add a Flexible widget or Expanded widget like below.