我想让我的TextField
高度与容器高度相同,请查看我的以下代码,并告诉我如何使TextField
匹配我的容器的match_parent。 我已检查了这个问题The equivalent of wrap_content and match_parent in flutter? ,但我没有找到任何解决方案。我需要让TextField
占据容器的全部宽度和高度。
new Container(
height: 200.0,
decoration: new BoxDecoration(
border: new Border.all(color: Colors.black)
),
child: new SizedBox.expand(
child: new TextField(
maxLines: 2,
style: new TextStyle(
fontSize: 16.0,
// height: 2.0,
color: Colors.black
),
decoration: const InputDecoration(
hintText: "There is no data",
contentPadding: const EdgeInsets.symmetric(vertical: 40.0),
)
),
),
)
请查看下面的屏幕截图。 如上所述,我需要我的TextField
占用Container
的全高。