MutableContentTransform


An object that allows manual manipulation of both entering and exiting content during the deferred phase (initiated by DeferredTransitionState.defer) of an AnimatedContent transition.

Summary

Public constructors

MutableContentTransform(
    initialVeilMatchParentSize: Boolean,
    targetVeilMatchParentSize: Boolean,
    initialOffsetVelocityProvider: (() -> Offset)?,
    targetOffsetVelocityProvider: (() -> Offset)?,
    block: MutableContentTransform.() -> Unit
)
Cmn

Public functions

Unit

Define the manual transformation to apply to the exiting content during the deferred phase.

Cmn
Unit

Define the manual transformation to apply to the entering content during the deferred phase.

Cmn

Public constructors

MutableContentTransform

MutableContentTransform(
    initialVeilMatchParentSize: Boolean = false,
    targetVeilMatchParentSize: Boolean = false,
    initialOffsetVelocityProvider: (() -> Offset)? = null,
    targetOffsetVelocityProvider: (() -> Offset)? = null,
    block: MutableContentTransform.() -> Unit = {}
)
Parameters
initialVeilMatchParentSize: Boolean = false

Whether the initial content's veil should match the parent size.

targetVeilMatchParentSize: Boolean = false

Whether the target content's veil should match the parent size.

initialOffsetVelocityProvider: (() -> Offset)? = null

The velocity of the offset change for the exiting content in pixels/sec. The initialOffsetVelocityProvider lambda is evaluated exactly once when the deferred phase ends to ensure a seamless handoff to the automatic transition.

targetOffsetVelocityProvider: (() -> Offset)? = null

The velocity of the offset change for the entering content in pixels/sec. The targetOffsetVelocityProvider lambda is evaluated exactly once when the deferred phase ends to ensure a seamless handoff to the automatic transition.

block: MutableContentTransform.() -> Unit = {}

A configuration block to set up the transformations for initial and target content.

Public functions

initialContentTransform

fun initialContentTransform(block: TransformScope.(fullSize: IntSize) -> Unit): Unit

Define the manual transformation to apply to the exiting content during the deferred phase.

Parameters
block: TransformScope.(fullSize: IntSize) -> Unit

A lambda that applies transformations to the provided TransformScope.

targetContentTransform

fun targetContentTransform(block: TransformScope.(fullSize: IntSize) -> Unit): Unit

Define the manual transformation to apply to the entering content during the deferred phase.

Parameters
block: TransformScope.(fullSize: IntSize) -> Unit

A lambda that applies transformations to the provided TransformScope.