我试图将TextField添加到Dialog,但是当键盘出现时,它会溢出。 My dialog Image. When the Keyboard shows up
这里我的代码部分如何看起来像:
AlertDialog(
content: new ListView(
shrinkWrap: true,
children: <Widget>[
Text(
"How Would You Rate Our App?",
style: TextStyle(fontSize: 16.0, fontWeight: FontWeight.bold),
textAlign: TextAlign.center,
)
你可以简单地使用SingleChildScrollView:
AlertDialog(
content: SingleChildScrollView(
scrollDirection: Axis.vertical,
child: Column(
children: <Widget>[
Text(
"How Would You Rate Our App?",
style: TextStyle(fontSize: 16.0, fontWeight: FontWeight.bold),
textAlign: TextAlign.center,
),
]
)
)
)