We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
BackHandler
enabled
For example, when running the following composable function:
@Composable fun Foo() { var enabled by remember { mutableStateOf(true) } println("enabled = $enabled") BackHandler(enabled) { println("Back pressed") } LaunchedEffect(Unit) { delay(5.seconds) enabled = false } }
We get the following output:
13:30:21 enabled = true 13:30:23 Back pressed 13:30:26 enabled = false 13:30:28 Back pressed
Having the initial value be false causes "Back pressed" to never be printed.
false
The text was updated successfully, but these errors were encountered:
BackHandler#enabled
veyndan
Successfully merging a pull request may close this issue.
For example, when running the following composable function:
We get the following output:
Having the initial value be
false
causes "Back pressed" to never be printed.The text was updated successfully, but these errors were encountered: