gestureInput

suspend fun gestureInput(block: suspend GestureScope.() -> Unit)

Suspends until the coroutine is canceled, collecting each map attachment and running block with a GestureScope receiver. When the map is replaced or detaches, the current block invocation is canceled and restarted on the new map.

This is the non-Composable counterpart of GestureInput. Prefer GestureInput inside Composition; use this function when you need gesture observation from a plain coroutine or custom LaunchedEffect with a lifecycle other than the default.

Parameters

block

a suspend lambda with GestureScope receiver.