Whats the best way to make a child composable over...
# compose
d
Whats the best way to make a child composable overshoot the boundaries of the outer composable?
s
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
Thanks, just constantly,
.wrapContentSize
works like charm. Just curious, are there other ways to go out of incoming constraints?
s
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.
👍 1