slideOutOfContainer

fun <T> AnimatedContentTransitionScope<T>.slideOutOfContainer(towards: SlideDirection, spec: FiniteAnimationSpec<Float> = spring(), targetOffset: (offsetForFullSlide: Int) -> Int = { it }): ExitTransition

Slides the outgoing content out of the container in the towards direction. The slide is measured across the container's bounds (see slideIntoContainer). Only meaningful inside AnimatedContent's transitionSpec.

Parameters

towards

The direction the exiting content moves.

spec

The animation spec for the slide. Defaults to spring.

targetOffset

Maps the container's full-slide extent in pixels to the target offset. Defaults to a full slide ({ it }).


fun <T> AnimatedContentTransitionScope<T>.slideOutOfContainer(towards: SlideDirection, duration: Duration, targetOffset: (offsetForFullSlide: Int) -> Int = { it }): ExitTransition

Slides the outgoing content out of the container over duration — a shortcut for slideOutOfContainer(towards, tween(duration), targetOffset).

Parameters

towards

The direction the exiting content moves.

duration

How long the slide runs.

targetOffset

Maps the container's full-slide extent in pixels to the target offset. Defaults to a full slide ({ it }).