I just wondered how you could make a LazyVGrid where every item takes only the place it needs, not less and not more.
I know about .flexible()
but the problem is: My Items are different sized, that means I don't know how many of them will fit in a row.
Do you got any ideas? Thanks for your help! Boothosh
EDIT:
LazyVGrid(columns: [GridItem(.flexible())]) {
Color.blue
.frame(width: 200, height: 200)
Color.blue
.frame(width: 100, height: 100)
Color.blue
.frame(width: 100, height: 100)
}
This is a example what Im talking about. I want to achieve that this items are placed with evenly space around them. (Not below each other, like they are now)