Whats the best way to make a child composable overshoot the boundaries of the outer composable?
s
Stylianos Gakis
11/01/2024, 9:21 AM
You mean you want the child not to be constrained by its parent's bounds?
Is that during some animation or just constantly?
.wrapContentSize(..., unbounded = true)
is one way to go outside of the incoming constraints for example.
d
Daniel Weidensdörfer
11/01/2024, 9:33 AM
Thanks, just constantly,
.wrapContentSize
works like charm. Just curious, are there other ways to go out of incoming constraints?
s
Stylianos Gakis
11/01/2024, 11:42 AM
You can also use a Modifier.layout {} to do the measuring and placement yourself.
Or if you force a child to have a certain size through Modifier.requiredSize() it will in fact go outside of the incoming constraints too. Center aligned in the available space.
There may be more but I can't think of any from the top of my head.