Let's say you have a parent widget that might have a variable size.
For example:
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(),
);
And maybe you want to have the child of the parent container render something different based on the size that it's given.
Think of responsive design breakpoints, if the width is over X use this layout, if the width is under X use that layout.
What's the best way to do this in Flutter?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…