Function

awaitEachGesture

Repeatedly calls block to handle gestures.

awaitEachGesture

Source set: Common
public suspend fun PointerInputScope.awaitEachGesture(
    block: suspend AwaitPointerEventScope.() -> 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.

block is run within PointerInputScope.awaitPointerEventScope and will loop entirely within the AwaitPointerEventScope so events will not be lost between gestures.

Jetpack Compose beyond MaterialFree components, screens and templates for apps that don’t look like Google’s. Copy them into your app, or let your coding agent add them.Browse for free

Content updated: