Ankit Shah
01/04/2022, 4:36 PMOG
01/04/2022, 5:41 PMModelBottomSheetLayout
component. There is a content
lambda on this component where you will place your root screen composable with the navigation tabs.Ankit Shah
01/05/2022, 10:10 AMOG
01/05/2022, 4:35 PMval bottomSheetContent = remember {
mutableStateOf {
{ } // Initially empty
}
}
And every time a screen wants to show a bottom sheet,
Step 1: it updates this state to be a lambda that returns a composable for that specific bottom sheet.
Step 2: it updates the bottom sheet state so the sheet content is rendered on screen
I find this pattern much cleaner so you can just deal with a single ModalBottomSheetLayout component. If this is unclear to you still, let me know and I'll create a gist and post a link here for you.