Is there a modifier to set a width for every child...
# compose
l
Is there a modifier to set a width for every child in a
Column
?
c
why not set the width of the column to that size and make the children have
fillMaxWidth()
?
3
c
Also, by default children are sized to content width, so they already are set to specific widths implicitly. The overall Column width will be the width of the longest child. Adding modifiers on the Column (parent) or individual children will change this of course.
l
@Christoph Wiesner @Chris Sinco [G] Yeah sure. I have 10 children...I was looking for a central modifier to avoid applying a modifier to every children. Then I will apply
fillmaxWidth(fraction = 0.8f)
to all childs. Just hoped there is a lazy solution which I'm not aware of yet 😅 Thanks guys
c
Well Modifiers can be stored in variables so that is one “lazy” approach 🙂
l
Good point. Thanks Chris 🙂