Flexible
Expanded
在一个
Column
会使
有孩子那么大
占去剩下的全部空间。然而
不会填满所有剩余的空间,并在其后留下一些空白空间。
+-----------------------------+
| Flexible, decides own size. |
+-----------------------------+
| Expanded, fills up the rest |
| |
| |
| |
| |
| |
| |
| |
| |
| |
+-----------------------------+
+-----------------------------+
| Flexible, decides own size. |
+-----------------------------+
| Expanded, takes up only |
| some of the remaining space |
| looks like about 50% of |
| the whole parent |
| |
| |
+-----------------------------+
| LOL here's unused space |
| for no good reason |
| |
+-----------------------------+
我怀疑我自己,然后我看到了同样的事情作为一个连续的错误报告:
https://github.com/flutter/flutter/issues/20575
我想我的问题是,我怎么能有一个固定大小的小部件
,然后是一个小部件,它占用了父对象的其余部分?