假设您有一个可能具有可变大小的父窗口小部件.
例如:
var container = new Container(
height: 200.0, // Imagine this might change
width: 200.0, // Imagine this might change
// Imagine content in this container will
// depend on the parent container
child: new Container(),
);
Run Code Online (Sandbox Code Playgroud)
也许你想让父容器的子进程根据它给出的大小来呈现不同的东西.
想想响应式设计断点,如果宽度超过X则使用此布局,如果宽度在X下使用该布局.
在Flutter中做到这一点的最佳方法是什么?