-
-
Save Ahmed-Sellami/9089488c2df4ae5b20dcbd8ba477272c 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
val animatedTopTranslation = remember { Animatable(0f) } | |
LaunchedEffect(isFired) { | |
if (isFired) { | |
animatedTopTranslation.animateTo( | |
targetValue = radius + topPadding + itemHeight / 2, | |
animationSpec = spring( | |
stiffness = Spring.StiffnessLow | |
) | |
) { | |
topTranslation = value | |
} | |
animatedTopTranslation.snapTo(0f) | |
topTranslation = 0f | |
onCompleteAnim() | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment