[英]Flutter make TableRow take the rest available space
I have a table with 3 rows, the IntrinsicColumnWidth
method set the sizes of the column according to the intrinsic dimensions of all the cells in that column.我有一个 3 行的表格, IntrinsicColumnWidth
方法根据该列中所有单元格的固有尺寸设置列的大小。 that means that they will take the minimum possible width.这意味着它们将采用尽可能小的宽度。 that exactly what i want for the first and the second column.这正是我想要的第一列和第二列。 My question is how can i make the third row takes the rest available space我的问题是如何让第三行占用其余可用空间
Table(
columnWidths: {
0: IntrinsicColumnWidth(),
1: IntrinsicColumnWidth(),
2: IntrinsicColumnWidth(), // i want this one to take the rest available space
},
...
),
I know it's late, but to anyone else looking for an answer to this question, you can try the code below.我知道现在已经晚了,但是对于正在寻找此问题答案的其他人,您可以尝试以下代码。
Table(
columnWidths: {
0: FlexColumnWidth(1.0),
1: FlexColumnWidth(1.0),
2: IntrinsicColumnWidth(), // i want this one to take the rest available space
},
...
),
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.