Function

scrollBy

Jump instantly by value pixels.

scrollBy

Source set: Common
suspend fun ScrollableState.scrollBy(value: Float): Float

Jump instantly by value pixels.

Cancels the currently running scroll, if any, and suspends until the cancellation is complete.

Parameters

value number of pixels to scroll by

Returns

the amount of scroll consumed

scrollBy

Source set: Common
suspend fun Scrollable2DState.scrollBy(value: Offset): Offset

Jump instantly by value pixels.

Cancels the currently running scroll, if any, and suspends until the cancellation is complete.

Parameters

value number of pixels to scroll by

Returns

the amount of scroll consumed

Last updated: