onScroll

Handles every pointer scroll event that hits this modifier's laid-out bounds.

Return

this chain with one appended active scroll handler.

Parameters

callback

callback receiving the typed event and modifier-local position and deciding propagation.

Throws

when callback fails during dispatch.


fun Modifier.onScroll(action: () -> Unit): Modifier(source)

Runs action for every pointer scroll event that hits this modifier and consumes the event.

Return

this chain with one appended consuming scroll handler.

Parameters

action

synchronous action invoked on the owning tree thread.

Throws

when action fails during dispatch.