androidx.compose.foundation.gestures

FlingBehavior

Interface · from org.jetbrains.compose.foundation:foundation:1.12.2

No hand-written docs yet.

Interface to specify fling behavior.

interface FlingBehavior

Kinds of FlingBehavior

Anywhere a FlingBehavior is expected, you can pass any of these.

How to get one

Ready-made values and functions that return it

Or create one of the kinds listed above.

Used by

Parameters that take a FlingBehavior.

Functions

performFling

fun ScrollScope.performFling(initialVelocity: Float): Float

Perform settling via fling animation with given velocity and suspend until fling has finished.

Library docs

Interface to specify fling behavior.

When drag has ended with velocity in scrollable, performFling is invoked to perform fling animation and update state via ScrollScope.scrollBy