DpAnimationSample
@Composable
fun DpAnimationSample() {
@Composable
fun HeightAnimation(collapsed: Boolean) {
// Animates a height of [Dp] type to different target values based on the [collapsed] flag.
val height: Dp by animateDpAsState(if (collapsed) 10.dp else 20.dp)
Box(Modifier.fillMaxWidth().requiredHeight(height).background(color = Color.Red))
}
}