My Material 3 `BottomSheetScaffold` is crashing wi...
# compose
r
My Material 3
BottomSheetScaffold
is crashing with this exception, are there any workarounds for this
1
k
Did you see the text of the exception
🙃 1
r
Which text are you referring to, I believe this was the text of the exception.
s
Yes, he’s asking if you checked if the offset was read before it was initialized, with the examples provided in the exception message itself
r
The problem was actually coming from the latest navigation compose library. I downgraded from
2.7.1
to
2.6.0
and the problem disappeared.
1
k
You didn't show any of your code around it, so it's not necessarily an issue in the navigation library. It might be that they've made a change that exposed an incorrect usage pattern in the app.
j
This issue has been fixed recently and should be resolved in the next alpha release of Material and Material 3. Until then, stay on Navigation 2.6.1.
r
Thanks @jossiwolf
s
By 2.6.1 I assume you mean 2.6.0 since the .1 doesn’t seem to exist https://mvnrepository.com/artifact/androidx.navigation/navigation-runtime right?
r
Yes 2.6.0 @Stylianos Gakis
👍 1
j
@Rafs: Do you use the BottomSheetScaffold with Partially expanded state ? While I am trying with “SkipPartiallyExpandaded” state value true, still I am facing the crash for the version
2.6.0
Copy code
val scaffoldState = rememberBottomSheetScaffoldState(
        bottomSheetState = SheetState(
            skipPartiallyExpanded = true,
            density = LocalDensity.current,
        )
    )