Function

forEachGesture

Repeatedly calls block to handle gestures.

RevenueCat

RevenueCat

Add subscriptions to your apps in minutes

Ad Get started for free
Common
Deprecated Use awaitEachGesture instead. forEachGesture() can drop events between gestures.

forEachGesture

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.