onRotaryInputAccumulated

fun Modifier.onRotaryInputAccumulated(eventAccumulationThresholdMs: Long = RotaryInputConfigDefaults.DEFAULT_EVENT_ACCUMULATION_THRESHOLD_MS, minValueChangeDistancePx: Float = RotaryInputConfigDefaults.DEFAULT_MIN_VALUE_CHANGE_DISTANCE_PX, rateLimitCoolDownMs: Long = RotaryInputConfigDefaults.DEFAULT_RATE_LIMIT_COOL_DOWN_MS, isLowRes: Boolean = false, onValueChange: (change: Float) -> Unit): Modifier

Accumulates the scroll distances from RotaryScrollEvent and notifies changes with onValueChange once accumulated value is over the thresholds.

Parameters

eventAccumulationThresholdMs

time threshold below which events are accumulated.

minValueChangeDistancePx

minimum distance for value change in pixels.

rateLimitCoolDownMs

cool down time when rate limiting is enabled, negative value disables.

isLowRes

resolution of the device's rotary control. High resolution and low resolutions have different accumulation mechanism. See RotaryInputAccumulator.changeByResolution for more.

onValueChange

callback invoked once accumulated value is over the thresholds.