scrollBy

Function

Common
fun SemanticsPropertyReceiver.scrollBy(
    label: String? = null,
    action: ((x: Float, y: Float) -> Boolean)?,
)

Action to asynchronously scroll by a specified amount.

scrollByOffset should be preferred in most cases, since it is synchronous and returns the amount of scroll that was actually consumed.

Expected to be used in conjunction with verticalScrollAxisRange/horizontalScrollAxisRange.

Parameters

labelOptional label for this action.
actionAction to be performed when SemanticsActions.ScrollBy is called.