Object

NavDisplay.TransitionKey

The key for NavEntry.metadata or Scene.metadata to notify the NavDisplay of how the content should be animated when adding to the backstack.

RevenueCat

RevenueCat

Add subscriptions to your apps in minutes

Ad Get started for free
Common
public object TransitionKey :
        NavMetadataKey<AnimatedContentTransitionScope<Scene<*>>.() -> ContentTransform>

The key for NavEntry.metadata or Scene.metadata to notify the NavDisplay of how the content should be animated when adding to the backstack.

IMPORTANT NavDisplay only looks at the Scene.metadata to determine the final ContentTransform. It is the responsibility of the Scene.metadata to decide which ContentTransform to return, whether that be from the NavEntry.metadata or something custom.

HOW TO USE Within the metadata DSL, invoke MetadataScope.put and pass TransitionKey as the key. The value: AnimatedContentTransitionScope<Scene<*>>.() -> ContentTransform? should be the ContentTransform to be used when adding to the backstack.