MaterialMotion
fun <S> MaterialMotion(targetState: S, transitionSpec: AnimatedContentTransitionScope<S>.() -> ContentTransform, modifier: Modifier = Modifier, pop: Boolean = false, contentAlignment: Alignment = Alignment.TopStart, label: String = "MaterialMotion", contentKey: (targetState: S) -> Any? = { it }, content: @Composable AnimatedVisibilityScope.(targetState: S) -> Unit)(source)
MaterialMotion allows to switch between two layouts with a material motion animation.
Parameters
transitionSpec
the ContentTransform to configure the enter/exit animation.
modifier
Modifier to be applied to the animation container.
pop
whether motion contents are rendered in reverse order.
label
An optional label to differentiate from other animations in Android Studio.
fun <S> Transition<S>.MaterialMotion(transitionSpec: AnimatedContentTransitionScope<S>.() -> ContentTransform, modifier: Modifier = Modifier, pop: Boolean = false, contentAlignment: Alignment = Alignment.TopStart, contentKey: (targetState: S) -> Any? = { it }, content: @Composable AnimatedVisibilityScope.(targetState: S) -> Unit)(source)
MaterialMotion allows to switch between two layouts with a material motion animation.
Parameters
transitionSpec
the ContentTransform to configure the enter/exit animation.
modifier
Modifier to be applied to the animation container.
pop
whether motion contents are rendered in reverse order.