【发布时间】:2018-03-01 12:14:52
【问题描述】:
我试图实现允许一个小部件溢出到另一个小部件的效果
如here所见@
到目前为止我的代码是这样的:
@override
Widget build(BuildContext context) {
Size screenSize = MediaQuery.of(context).size;
return new Column(children: <Widget>[
new Container(
color: Colors.blue,
height: screenSize.height / 2,
width: screenSize.width,
child: new Center(
child: new Container(
margin: const EdgeInsets.only(top: 320.0),
color: Colors.red,
height: 40.0,
width: 40.0,
),
))
]);
}
这导致following,正方形被容器截断了。
还有其他方法吗?
【问题讨论】:
标签: flutter