on Back Pressed Dispatcher
Get the current OnBackPressedDispatcher from Fragment.
The current Fragment must be attached to a ComponentActivity.
Receiver
the current Fragment.
Return
Throws
if the current Fragment is not attached to a ComponentActivity.
Get the current OnBackPressedDispatcher from View.
The current View must be attached to a view tree and hosted by a ComponentActivity.
Receiver
the current View.
Return
Throws
if the current View is not attached to a LifecycleOwner or its host is not a ComponentActivity.