Lukasz Kalnik
08/04/2022, 2:51 PMcontent in ModalBottomSheetLayout when sheetContent takes all the contents of the bottom sheet?
What if I want to display this modal bottom sheet over different screens, should I just then leave content empty?curioustechizen
08/04/2022, 2:57 PMModalBottomSheetLayout is not meant for displaying a bottom sheet. It is meant for displaying a screen along with a bottom sheet.
The sheetContent by itself does not exist in isolation, it is always shown over content.
If you want to show the sheet over different screens then you have 2 choices:
1. Include the ModalBottomSheetLayout itself high enough in the tree such that it is a common parent of all screens where you want to show the bottom sheet
2. Make every screen that you want to have bottom sheet to use ModalBottomSheetLayout for its layout.
I went for option 2 because I only have a handful of screens where I need this. You could make this less repetitive by creating your own wrapper around ModalBottomSheetLayout and just exposing content as a slot for consumers.Yves Kalume
08/04/2022, 2:57 PMcontent contains de main content of the page, and sheetContent contains the bottom sheet contentLukasz Kalnik
08/04/2022, 3:22 PM