When customizing the transition of the AnimatedContent
composable, one may use the function togetherWith
that runs both enter and exit transitions simultaneously.
AnimatedContent(
targetState = animationState,
transitionSpec = {
fadeIn(tween(durationMillis = FadeInMillis, easing = LinearEasing)) togetherWith
fadeOut(tween(durationMillis = FadeOutMillis, easing = LinearEasing))
}
) { targetState ->
...
}
However, I would like to run the transitions sequentially, i.e. fade in a target state after an initial state completely faded out. How can one do that?