DeferredAnimatedContent
A container that animates between the contents of this deferred transition's states. During a deferred phase, both contents are transformed as mutableTransformSpec declares.
A deferred phase, which a DeferredTransitionState begins with defer and ends with animateTo, does not advance the transition, so the transform alone decides how the contents look. Drive it from the state a gesture writes:
val state = remember { DeferredTransitionState(Page.Summary) }
rememberTransition(state).DeferredAnimatedContent(
mutableTransformSpec = {
MutableContentTransform { targetContentTransform { alpha = progress } }
},
) { Body(it) }When the phase ends in a transition, each value continues from where the transform left it; see MutableTransform.
Otherwise behaves as the Transition overload.
Parameters
the SwingModifier applied to the container.
how the target content enters, how the old content exits, and how the container's size animates; a short fade and scale in over a shorter fade out by default. See AnimatedContentTransitionScope.
where each content sits inside the container.
what makes two states one content; the state itself by default.
how the two contents are transformed during a deferred phase, evaluated in the scope of the change that phase announces. By default nothing is transformed.
the composable content of one state of the container; see AnimatedContentScope.