Hi, if I use a Spacer in SwiftUI without a height...
# compose
a
Hi, if I use a Spacer in SwiftUI without a height argument, the spacer takes all available space. Is there an equivalent in Compose? So if I have a Column, that has the following subviews: "HeightSpacer, Text, HeightSpacer, Text, HeightSpacer" the HeightSpacers should equally take the remaining space automatically.
z
I guess you could use FlexColumn to achieve this instead of spacers
l
SpaceEvenly as an argument of alignment for the column, without even adding the spacers, will do the same
a
Alright, that works if you want only evenly spaced lines, that's great! But what if you needed something like "SpaceEvenly, Text, HeightSpacer(10.dp), Text, SpaceEvenly" (mixing fixed Spacers with Spacers, that should take the remaining spaces) Seems like you have to use nested Columns? That makes it more complicated than the SwiftUI approach imho, or do I miss something?
z
In that case you can have Column with Center alignment. In more advanced cases you can have FlexColumn.