Hello, I bump my project to Compose 1.4 and find a...
# compose-android
l
Hello, I bump my project to Compose 1.4 and find an odd crash with `BottomSheetScaffold`: if the BottomSheetValue == Expanded when I nav to another screen and then nav back to the screen with the BottomSheetScaffold, the app crash with the following exception:
Copy code
java.lang.IllegalStateException: The offset was read before being initialized. Did you access the offset in a phase before layout, like effects or composition?
Is this an intended behavior and we have to collapse the bottomSheet before leaving composition or a bug? Thanks!
j
I believe we fixed this in
1.5.0-alpha01
as per https://issuetracker.google.com/issues/266780234
l
It keeps crashing with
1.5.0-alpha01
in my case
j
In that case, I would suggest filing a new bug with a minimal repro that demonstartes the crash, and mention that you tested with
1.5.0-alpha01
l
s
@jossiwolf ^^
j
The issue @jim linked is about ModalBottomSheetLayout, we fixed a similar issue with BottomSheetScaffold in https://developer.android.com/jetpack/androidx/releases/compose-material#1.5.0-alpha02
Apologies, the fix for BottomSheetScaffold has not been released yet. It will be released as part of the next alpha release!
d
I still don't think this is fixed for material3 https://issuetracker.google.com/issues/283317596
583 Views