When the LifecycleOwner is destroyed, it will
automatically be removed from the list of callbacks. The only time you would need to
manually call OnBackPressedCallback.remove() is if
you'd like to remove the callback prior to destruction of the associated lifecycle.

If the Lifecycle is already destroyed
when this method is called, the callback will not be added.

Parameters

owner

LifecycleOwner: The LifecycleOwner which controls when the callback should be invoked