https://kotlinlang.org logo
#compose-android
Title
# compose-android
a

Atul Gupta

11/23/2023, 8:22 PM
Is there way to fill the width of bottom sheet in
BottomSheetScaffold
to full screen width? I am using something like below but of no avail
Copy code
BottomSheetScaffold(
    modifier = Modifier.fillMaxWidth(),
    ...
I have seen that
BottomSheetScaffold.kt
hardcodes the width to
BottomSheetMaxWidth
to
640.dp
. Is there way to override that?
a

Atul Gupta

11/23/2023, 10:03 PM
Thanks @Stylianos Gakis. But the commit above fixes the issue for
ModalBottomSheet
in my case
BottomSheetScaffold
uses the
StandardBottomSheet
s

Stylianos Gakis

11/23/2023, 10:28 PM
I see! Time to not use bottom sheet scaffold and use ModalBottomSheet instead then 😂
a

Atul Gupta

11/23/2023, 10:30 PM
Haha.. there is place for both.. 😅
a

Ankit Kumar

11/24/2023, 5:25 PM
can you try putting fillMaxWidth inside content
a

Atul Gupta

11/24/2023, 6:42 PM
Na that will not work.. as
fillMaxWidth
only respects the incoming constraints and in this case that is set of
640.dp
so child will not go beyond that
also tried the same and it is not working
38 Views