constraintlayout
constraintlayout copied to clipboard
[Compose] Animate on constraint property change when 'animateChanges' is true.
Animate when we have something like:
var isVisible by remember {...}
...
ConstraintSet {
...
constraint(id1) {
visibility = if (isVisible) Visible else Gone
}
}
Would probably require the ConstraintSet to be a Composable, or have something like 'rememberConstraintSet {...}'
Reasoning is that this is likely a more common pattern than:
val constraintSet = if (isVisible) visibleConstraintSet else goneConstraintSet
document the recommended (working) pattern.