snapTo

suspend fun snapTo(targetState: S)

Sets currentState and targetState to targetState and snaps all values to those at that state. The transition will not have any animations running after running snapTo.

This can have a similar effect as seekTo. However, seekTo moves the currentState to the former targetState and animates the initial values of the animations from the current values to those at currentState. seekTo also allows the developer to move the state between any fraction between currentState and targetState, while snapTo moves all state to targetState without any further seeking allowed.

See also