Created
October 14, 2022 02:04
-
-
Save AndroidPoet/54300600e32d04cb4fa2fc66565ea272 to your computer and use it in GitHub Desktop.
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
@Composable | |
fun DemoCoroutineScope() { | |
val scope = rememberCoroutineScope() | |
Button(onClick = { | |
scope.launch { | |
//CoroutineScope | |
//run any suspend functions inside this scope | |
} | |
}) { | |
Text(text = "I can execute suspend functions") | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment