PreCompose icon indicating copy to clipboard operation
PreCompose copied to clipboard

Bottom sheet route

Open amv-bamboo opened this issue 1 year ago • 6 comments

I'm trying to implement bottom sheet destination similar to Accompanist with Precompose, but it seems that I cannot extend Navigator, and floating destination doesn't work properly. Is it possible to implement bottom sheet route on the app side, or do I need to create a PR for the library?

Before switching to multiplatform, I used separate NavHost inside ModalBottomSheet. But now it seems that that there can be only one NavHost

amv-bamboo avatar Sep 25 '23 09:09 amv-bamboo

Is it possible to implement bottom sheet route on the app side

Theoretically, yes. You can have an empty floating route and wrap your NavHost with ModalBottomSheetLayout, when Navigator.currentEntry is your bottom sheet route you can show the bottom sheet. A built in should be better. I'm considering making Navigator extendable, and not only being used in Compose(maybe SwiftUI?)

Tlaster avatar Sep 26 '23 01:09 Tlaster

Is there any update regarding this?

FunkyMuse avatar Nov 30 '23 11:11 FunkyMuse

Turns out that Compose Multiplatform didn't have ModalBottomSheet then, so I did a workaround with BottomSheetScaffold and toggling its bottom sheet state instead of navigating to destination

amv-bamboo avatar Dec 01 '23 09:12 amv-bamboo

Turns out that Compose Multiplatform doesn't have ModalBottomSheet for now, so I did a workaround with BottomSheetScaffold and toggling its bottom sheet state instead of navigating to destination

It does have Modal bottom sheet

FunkyMuse avatar Dec 01 '23 12:12 FunkyMuse

Oh, maybe it's there now, but I couldn't find it when I opened the issue

amv-bamboo avatar Dec 01 '23 13:12 amv-bamboo