假设您有一个父小部件,它可能具有可变大小。
例如:
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(),
);
也许您希望父容器的子代根据其所给出的大小呈现不同的内容。
想一想响应式设计断点,如果宽度超过X,则使用此布局,如果宽度小于X,则使用那个布局。
Flutter中如何最好地实现这个功能?