Hello, is there any way to prevent ModalBottomShee...
# compose
l
Hello, is there any way to prevent ModalBottomSheet to apply imePadding internally to the whole sheet? Any workaround for this?
s
Some options I see 1. Copy the entire implementation to your project and edit the code as you see fit 2. Consume the insets before you call the sheet so by the time it tries to apply them there are no insets left to apply (probably possible but haven't tried it myself. See https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:compose/foundation/foundation-layout/src/commonMain/kotlin/androidx/compose/foundation/layout/WindowInsetsPadding.kt;l=94?q=ConsumeWindowIns&sq=) 3. Use a different library which gives you sheets that are not made with such strict restrictions like the material ones are
l
I've tried option number 1, but unfortunately that composable has a lot of related stuff I would have to copy which is not ideal (lots of internal classes). As per option number 2, I haven't found a way to make it work, consuming the insets before the ModalSheet composable doesn't work as the insets to consume are not on the same Window (the bottom sheet is rendered on its own Window)