https://kotlinlang.org logo
#compose
Title
# compose
s

Shakil Karim

02/26/2021, 3:27 PM
I found Bottom Sheet API very weird to use, for example when I have show more than 1 bottom sheet on screen, I have to do something like that.
Copy code
ModalBottomSheet(
    sheetState = clubsSheetState,
    sheetContent = {
          ---------Sheet 1 content
    },
    content = {
        ---- Sheet 1 body
          ModalBottomSheet(
               sheetState = clubsSheetState,
               sheetContent = {
                     ---------Sheet 2 content
               },
               content = {
                   ---- Sheet 2 body
               })

    })
Isn't it will be better to use it like Dialog if(show) { BottomSheet() }
h

Halil Ozercan

02/26/2021, 3:37 PM
why don't you treat the content of your bottom sheet like a navigation host? You can decide on the content by looking at the current state.
💯 1
s

Shakil Karim

02/26/2021, 9:54 PM
@Halil Ozercan Do you have any example code, i was thinking to modify existing ModalBottomSheet
2 Views