TruongSinh
TruongSinh

Reputation: 4866

2 rows in the same line if there is enough space

If you have something like this:

Wrap(
Row(
  Box(75),
  Box(75),
  Box(75),
),
Row(
  Box(75),
  Box(75),
  Box(75),
),
)

The second row is placed in separate line after first row even if there is enough space. Is there a way for me to place them side by side in 1 line, and they only go to 2 lines when the rows get too big for the screen size?

enter image description here

Upvotes: 0

Views: 163

Answers (1)

TruongSinh
TruongSinh

Reputation: 4866

Rows are broken to different line because by default the occupy maximum width. To achieve the desired layout, set Row's width to MainAxisSize.min

Upvotes: 2

Related Questions