我有带有 TextField 和 Flexible 的列。灵活的由显示英雄角色列表的 ListView 组成。当我开始关注 TextField 时,显示器显示 x 像素的渲染溢出。怎么做才能避免这种情况?
@override
Widget build(BuildContext context) {
return new Stack(
children: <Widget>[
new Padding(
padding: new EdgeInsets.all(10.0),
child: new TextField(
keyboardType: TextInputType.text,
controller: tc,
),
),
new Column(
mainAxisSize: MainAxisSize.min,
children: <Widget>[
new Container(
margin: new EdgeInsets.only(top: 60.0),
height: MediaQuery.of(context).size.height * 0.67,
child: checkList(context, characterDataWrapper), //MY LISTVIEW
),
new Flexible(
fit: FlexFit.loose,
child: new Container(),
),
new Column(
crossAxisAlignment: CrossAxisAlignment.center,
mainAxisSize: MainAxisSize.max,
mainAxisAlignment: MainAxisAlignment.end,
children: <Widget>[
new RaisedButton(
onPressed: getData,
color: Colors.red,
textColor: Colors.white,
child: new Text("Click"),
),
]),
],
)
],
);
}