🌈 Create new beautiful Compose Gradients with our new wesite ->
Function

forEachGesture

Repeatedly calls block to handle gestures.

forEachGesture

Source set: Common
@Deprecated(
    message = "Use awaitEachGesture instead. forEachGesture() can drop events between gestures.",
    replaceWith = ReplaceWith("awaitEachGesture(block)"),
)
public suspend fun PointerInputScope.forEachGesture(block: suspend PointerInputScope.() -> Unit)

Repeatedly calls block to handle gestures. If there is a CancellationException, it will wait until all pointers are raised before another gesture is detected, or it exits if isActive is false.

awaitEachGesture does the same thing without the possibility of missing events between gestures, but also lacks the ability to call arbitrary suspending functions within block.