onRemove

open suspend fun onRemove()

Callback that is invoked after this OverlayScene is popped from the backStack, but before it leaves composition.

Animations for exiting overlays should be implemented within onRemove. This ensures that any suspending animations or other suspending work completes before the overlay is removed from composition.

Samples

androidx.navigation3.ui.samples.AnimatedBottomSheetSample