Does anyone know if i can get a BottomSheetNavigat...
# compose
Does anyone know if i can get a BottomSheetNavigator to allow me to default to something other than 50% height?
I tried that approach of the skipHalfExpanded, and it wasn’t working for me. Also of note is that im’ on 1.1.1, not the 1.2 rc
When tried the custom function to use the modal bottom sheet layout, i found it still kept things at 50% screen size, because you have to be able to set your own sheet content.
Accompanist Navigation Material provides a bridge between Navigation Compose and Compose Material. Modal bottom sheets have a specified behavior in the Material Design guidelines - they don't currently allow customization of the peek height, which is why the Compose implementation doesn't provide an API to customize the available states🙂 Since the upstream doesn't have an API for it, we can't support it in Accompanist either.
is a bit of an exception, it is present on the upstream component but there are a few upstream bugs that need to be fixed first before we can offer it in Accompanist.
That said, it’s actually pretty easy with a ModalBottomSheetLayout to acheive a different height:
Copy code
sheetContent = {
  Column(modifier = Modifier.fillMaxHeight(screenHeightPct)) {
I don’t know if this is an intended feature or not, but it is there, and it would seem that exposing this ability to set the screen height pct in accompanist (along with rejecting state changes on clicking outside or the back button) wouldn’t be too difficult. Whether, philisophically you would to expose this is another story, but i think it’s technically feasible.