Back Handling
Last updated
Last updated
Each navigator has a overrideBackPress
that is stateful and can be updated to allow overriding the back press. It's set to true
by default and it the back stack as we click back.
We can override back press in our Composables by using NavBackHandler
:
You can also initialize the navigator with overrideBackPress = false
and use your own logic for back handling based on the backstack.