【发布时间】:2021-09-08 04:51:44
【问题描述】:
我正在创建一个对话框,当我单击编辑图标按钮时它会打开,但是当我单击文本字段输入文本时它会向我发送此错误
════════ Exception caught by rendering library ═════════════════════════════════
A RenderFlex overflowed by 14 pixels on the bottom.
The relevant error-causing widget was
AlertDialog
这是我的对话框代码
void _getSelectedRowInfo(dynamic date,dynamic timein,dynamic timeout) {
Widget okButton = FlatButton(
child: Text("Submit",style: TextStyle(fontWeight: FontWeight.bold,color: Colors.blue[500],fontSize: 20),),
onPressed: () {
},
);
AlertDialog alert = AlertDialog(
scrollable: true,
//contentPadding:EdgeInsets.fromLTRB(0, 20, 0, 20),
insetPadding: EdgeInsets.symmetric(vertical: 150),
//contentPadding: const EdgeInsets.all(16.0),
title: Text("Request to change time",style: TextStyle(fontWeight: FontWeight.bold,color: Colors.blue[500])),
content:Container(child: SingleChildScrollView(
scrollDirection: Axis.vertical,
child:Column(children:<Widget> [
TextField(
decoration: InputDecoration(labelText: date,hintText: "Date"),
controller:dateController ,
),
TextField(
decoration: InputDecoration(labelText: timein,hintText: "Time in"),
controller:timeinController ,
),
TextField(
decoration: InputDecoration(labelText:timeout,hintText: "Time out"),
controller:timeoutController ,
),
]),
)
),
actions: [
okButton,
],
);
showDialog(
context: context,
builder: (BuildContext context) {
return alert;
},
);
}
这是我的对话框的样子
当点击第一个文本字段时,它看起来像这样
请帮我解决一下。
【问题讨论】:
标签: android flutter dart popup render