animateTo

fun animateTo(targetState: S)

Clears the pendingTargetState and updates the targetState to the provided targetState, ending the deferred phase and starting the automatic transition animation.

Note: The targetState provided here does not need to match the previous pendingTargetState. If a different state is provided, the transition will animate directly to this new state, bypassing the previously deferred target.

Parameters

targetState

The final target state for the transition.