Skip to content

Instantly share code, notes, and snippets.

@alohaabhi
Created March 30, 2023 09:31
Show Gist options
  • Save alohaabhi/1c7e20625a1ea8a4208d36ec25491a14 to your computer and use it in GitHub Desktop.
Save alohaabhi/1c7e20625a1ea8a4208d36ec25491a14 to your computer and use it in GitHub Desktop.
var circleScale by remember { mutableStateOf(1f) }
val animatedCircleScale by animateFloatAsState(targetValue = circleScale)
Box(
modifier = Modifier
.scale(animatedCircleScale)
.requiredSize(100.dp)
.clip(CircleShape)
.background(MaterialTheme.colorScheme.primaryContainer)
)
Button(onClick = {
circleScale = 0.5f
}) {
Text(text = "Hit")
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment