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
val blah = 22 |
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) { | |
awaitPointerEventScope { //<-- Executes | |
while (true) { //<-- Executes | |
val event = awaitPointerEvent() //<-- Suspends | |
// Do something with the event. | |
} |
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. | |
} |