How to use LazyVGrid or LazyHGrid to get displayed content based on size?

Viewed 2633

Is it possible to use LazyVGrid or LazyHGrid to get a view like this?

enter image description here

The Text values are rendered in the box, and if there is no more space near the right border, then it starts on the next row.

I have tried using the LazyGrids but it seems that since I am required to give a minimum column width

LazyVGrid(columns: [
   GridItem(.adaptive(minimum: 60)),
],

The text gets truncated. Is there any way to accomplish the view in the image above using grids?

0 Answers
Related