ComposeRouteTransition

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

ComposeRouteTransition defines a route transition

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.

Constructors

Link copied to clipboard
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)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
val baseLayerOverlay: @Composable BoxScope.(isPopping: Boolean, isPredictiveBack: Boolean, transition: SeekableTransitionState<RouteStackEntry>) -> Unit?
Link copied to clipboard
val enter: AnimatedContentTransitionScope<RouteStackEntry>.(density: Density) -> EnterTransition
Link copied to clipboard
Link copied to clipboard
val exit: AnimatedContentTransitionScope<RouteStackEntry>.(density: Density) -> ExitTransition
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val popExit: AnimatedContentTransitionScope<RouteStackEntry>.(density: Density) -> ExitTransition
Link copied to clipboard
val predictiveBackEnter: AnimatedContentTransitionScope<RouteStackEntry>.(density: Density, swipeEdge: Int) -> EnterTransition
Link copied to clipboard
Link copied to clipboard
val predictiveBackExit: AnimatedContentTransitionScope<RouteStackEntry>.(density: Density, swipeEdge: Int) -> ExitTransition
Link copied to clipboard