ComposeRouteTransition

constructor(enter: AnimatedContentTransitionScope<RouteStackEntry>.(density: Density) -> EnterTransition, exit: AnimatedContentTransitionScope<RouteStackEntry>.(density: Density) -> ExitTransition, popEnter: AnimatedContentTransitionScope<RouteStackEntry>.(density: Density) -> EnterTransition, popExit: AnimatedContentTransitionScope<RouteStackEntry>.(density: Density) -> ExitTransition, supportsPredictiveBackForEdge: (edge: Int) -> Boolean = DefaultPredictiveBackSupport, predictiveBackEnter: AnimatedContentTransitionScope<RouteStackEntry>.(density: Density, swipeEdge: Int) -> EnterTransition = { density, edge -> popEnter(density) }, predictiveBackExit: AnimatedContentTransitionScope<RouteStackEntry>.(density: Density, swipeEdge: Int) -> ExitTransition = { density, edge -> popExit(density) }, enterZ: Float = 1.0f, popEnterZ: Float = -1f, predictiveBackEnterZ: Float = -1f, baseLayerOverlay: @Composable BoxScope.(isPopping: Boolean, isPredictiveBack: Boolean, transition: SeekableTransitionState<RouteStackEntry>) -> Unit? = null)

Parameters

enter

The animation for incoming content during a push()

exit

The animation for the outgoing content during a push()

popEnter

The animation for incoming content during a pop()

popExit

The animation for outgoing content during a pop()

predictiveBackEnter

An optional animation for predictive back. If no animation is supplied, the pop enter animation will be used

predictiveBackExit

An optional animation for predictive back. If no animation is supplied, the pop exit animation will be used

enterZ

The z-layer for the enter animation. By default, the enter animation will be on top of the exit animation. Valid values are 1f or -1f. The exit animation will be placed on the inverse z-layer. For example, if enterZ is set to 1f, the exit animation is set to -1f.

baseLayerOverlay

An optional overlay for the bottom-most layer when transitioning. This allows placing a scrim or blackout transition during the animation.