Skip to content

Instantly share code, notes, and snippets.

@Ahmed-Sellami
Created August 24, 2021 17:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Ahmed-Sellami/d93b3dcbd97d4877d201d5f0be548f63 to your computer and use it in GitHub Desktop.
Save Ahmed-Sellami/d93b3dcbd97d4877d201d5f0be548f63 to your computer and use it in GitHub Desktop.
val animatedRadius = remember { Animatable(particleRadius) }
val animatedAlpha = remember { Animatable(0f) }
LaunchedEffect(isVisible) {
if (isVisible) {
animatedRadius.animateTo(maxRadiusPx, animationSpec = tween()) {
radius = value
}
animatedAlpha.animateTo(1f, animationSpec = tween()) {
visibilityAlpha = value
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment