Fixed
Status Update
Comments
je...@google.com <je...@google.com>
ap...@google.com <ap...@google.com> #2
It is expected that BackHandler
crashes in cases where no LocalOnBackPressedDispatcherOwner
Given that LocalOnBackPressedDispatcherOwner.current
is nullable, you can certainly wrap your call to BackHandler
in a null check if you'd like to specifically disable that functionality when in @Preview
. Of course, you could just provide your own OnBackPressedDispatcherOwner
by constructing an OnBackPressedDispatcher
instance yourself as part of your @Preview
.
Andrey - any thoughts on whether we should have @Preview
automatically create and set a LocalOnBackPressedDispatcherOwner
as we do for LocalViewModelStoreOwner
Description
No description yet.