根据颤振文档Containers with no children try to be as big as possible unless the incoming constraints are unbounded, in which case they try to be as small as possible. Containers with children size themselves to their children.,我最接近于让它开始工作:
return Stack(
children: <Widget>[
Container(
wid
我从颤振开始,想要创建一个小部件,它的每个边都有不同的颜色边框,这取决于一个条件。
decoration: new BoxDecoration(
border: new Border(
top: new BorderSide(width: 1.0, color: Colors.red),
left: new BorderSide(width: 1.0, color: Colors.red),
right: new BorderSide(width: 1.0, color: Colors.red),
bottom: new BorderSide(width: 1.0, colo