Slide 23
Slide 23 text
var activated by remember { mutableStateOf(true) }
val contentColor by animateColorAsState( ... )
val containerColor by animateColorAsState( ... )
val scale by animateFloatAsState( ... )
Button(
modifier = Modifier.scale(scale),
colors = ButtonDefaults.buttonColors(
containerColor = containerColor,
contentColor = contentColor,
),
onClick = { activated = !activated },
) { Text(if (activated) "Activated" else "Inactivated") }
Animation