Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save codingjeremy/b4d0915b0a65d710f73bf35898527d77 to your computer and use it in GitHub Desktop.
Save codingjeremy/b4d0915b0a65d710f73bf35898527d77 to your computer and use it in GitHub Desktop.
How code executes AFTER the improvement to Compose's Pointer Input.
/* Copyright 2023 Google LLC.
SPDX-License-Identifier: Apache-2.0 */
Box(Modifier
.fillMaxSize()
.pointerInput(Unit) { //<-- Suspends block
awaitPointerEventScope {
while (true) {
val event = awaitPointerEvent()
// Do something with the event.
}
}
}
) { ... }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment