drawAnimationLayer

abstract fun ContentDrawScope.drawAnimationLayer(image: ImageBitmap, progress: Float, pressPosition: Offset?, useDynamicContent: Boolean)

Draws the animated layer during a theme transition.

This method is called during the animation frame to render the new theme over the old one. The implementation determines the visual effect of the transition.

Parameters

image

The image bitmap containing the new theme's visual representation.

progress

The animation progress value, ranging from 0.0f (start) to 1.0f (complete).

pressPosition

The screen position where the theme toggle was triggered. May be null if position tracking is not available.

useDynamicContent

If true, draw dynamic content from the new theme; otherwise draw from the static image bitmap. Dynamic content preserves animations and scrolling during the transition (note that it is only true for the target theme part).