Created
April 13, 2023 17:43
-
-
Save codingjeremy/b4d0915b0a65d710f73bf35898527d77 to your computer and use it in GitHub Desktop.
How code executes AFTER the improvement to Compose's Pointer Input.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* 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