Created
April 17, 2026 17:28
-
-
Save AndroidPoet/689a1231abaf77e577f269c0591fba90 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 AndroidBackHandler(navController: NavController) { | |
| BackHandler { | |
| if (!navController.popBackStack()) { | |
| // Can't go back further, exit the app | |
| } | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment