skydoves / FlexibleBottomSheet

🐬 Advanced Compose Multiplatform bottom sheet for segmented sizing, non-modal type, and allows interaction behind the bottom sheet similar to Google Maps.
Apache License 2.0
687 stars 30 forks source link

Show non-modal sheet above and under a BottomAppBar #20

Open jordond opened 4 months ago

jordond commented 4 months ago

Is your feature request related to a problem?

I am trying to use FlexibleBottomSheet on a screen that uses Scaffold and bottomBar. When I add the FlexibleBottomSheet to the screen it sits on top of the NavigationBar.

image

Using the following state:

rememberFlexibleBottomSheetState(
      isModal = false,
      skipSlightlyExpanded = true,
       flexibleSheetSize = FlexibleSheetSize().copy(
          fullyExpanded = 0.5f,
          intermediatelyExpanded = 0.05f, 
     )
)

Describe the solution you'd like:

I would like the sheet to be displayed below and above the NavigationBar. Basically sitting on top of it with a tiny amount visible, then expanding when the user drags up.

Describe alternatives you've considered:

I've tried adding Modifier.padding() but that causes the whole thing to vanish. I'm looking into setting the WindowInsets next.

jordond commented 4 months ago

I was able to get the partially expanded state above the NavigationBar using BottomSheetDefaults.windowInsets.add(WindowInsets(bottom = 64.dp)).

But the issue of it drawing on top of the

NavigationBar is still a problem:

https://github.com/skydoves/FlexibleBottomSheet/assets/528792/f491020f-9fb7-459d-8fea-77c092feede7