我试图达到让一个小部件溢出到其他窗口的效果
所看到这里
我到目前为止的代码是这样的:
@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,
),
))
]);
}
Run Code Online (Sandbox Code Playgroud)
这导致以下情况,正方形被容器切断。
还有另一种方法吗?
flutter ×1