An object that allows manual manipulation of the visual transformations (alpha, scale, offset, etc.) of content during the deferred phase (initiated by DeferredTransitionState.defer) of a DeferredTransition (e.g., for predictive back gestures).

Manual transformations defined in this object are applied on top of the transition's initial state.

This object provides an invoke operator that accepts a TransformScope lambda. This lambda is evaluated repeatedly to ensure that state reads (e.g., from gesture progress) are deferred to the layout phase, preventing unnecessary composition churn while keeping Draw-phase operations performant.

Values set in this object are seamlessly handed off to the automatic transition animation when the deferred phase ends.

Summary

Public constructors

MutableTransform(
    veilMatchParentSize: Boolean,
    offsetVelocityProvider: (() -> Offset)?,
    block: (TransformScope.(fullSize: IntSize) -> Unit)?
)
Cmn

Public functions

operator Unit
invoke(block: TransformScope.(fullSize: IntSize) -> Unit)

Define the manual transformation to apply during the deferred phase.

Cmn

Public constructors

MutableTransform

MutableTransform(
    veilMatchParentSize: Boolean = false,
    offsetVelocityProvider: (() -> Offset)? = null,
    block: (TransformScope.(fullSize: IntSize) -> Unit)? = null
)
Parameters
veilMatchParentSize: Boolean = false

Whether the veil should match the size of the parent.

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

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

block: (TransformScope.(fullSize: IntSize) -> Unit)? = null

A lambda that applies transformations to the provided TransformScope. This block executes dynamically to reflect state changes.

Public functions

invoke

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

Define the manual transformation to apply during the deferred phase.

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

A lambda that applies transformations to the provided TransformScope. This block executes dynamically to reflect state changes.