Skip to content

Instantly share code, notes, and snippets.

@GianpaMX
Created April 28, 2022 09:38
Show Gist options
  • Save GianpaMX/06427002502db2d2937c312290736f0b to your computer and use it in GitHub Desktop.
Save GianpaMX/06427002502db2d2937c312290736f0b to your computer and use it in GitHub Desktop.
val transitionState = remember { MutableTransitionState(AnimationState.NOT_STARTED) }
val transition = updateTransition(transitionState, label = "transition")
val elevation by transition.animateDp(
label = "elevation",
targetValueByState = { if (it.hasStarted()) 14.dp else 0.dp }
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment