How to use navigateUp to close the application
As per the navigateUp() documentation and popBackStack() documentation, both return a boolean value indicating: true if the stack was popped and the user has been navigated to another destination, false otherwise The NavController only controls its own back stack (i.e., the destinations you’ve put on the back stack) and does not contain or operate on … Read more