Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Flutter make TableRow take the rest available space

Tags:

flutter

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. 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
   },
   ...
),
like image 243
ler Avatar asked Oct 24 '25 17:10

ler


1 Answers

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
   },
   ...
),
like image 145
user1458341 Avatar answered Oct 26 '25 07:10

user1458341



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!