🌈 Create new beautiful Compose Gradients with our new wesite ->
Function

settle

Find the closest anchor, taking into account the velocityThreshold and positionalThreshold, and settle at it with an animation.

settle

Source set: Common
suspend fun settle(velocity: Float)

Find the closest anchor, taking into account the velocityThreshold and positionalThreshold, and settle at it with an animation.

If the velocity is lower than the velocityThreshold, the closest anchor by distance and positionalThreshold will be the target. If the velocity is higher than the velocityThreshold, the positionalThreshold will not be considered and the next anchor in the direction indicated by the sign of the velocity will be the target.

Content updated: