Created
March 30, 2023 09:31
-
-
Save alohaabhi/1c7e20625a1ea8a4208d36ec25491a14 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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