I can't find ModalBottomSheetLayout in material3 with jetpack compose?
I

4

6

Update

We finally have BottomSheet in Material3 follow this ans Link

Recently I created a project using `material3` with `jetpack compose` but when I tried to import `ModalBottomSheetLayout` but I couldn't find it. Is there any `alternate in material3` or not ?

In previous material version we do like :-

ModalBottomSheetLayout(sheetContent = ) {
        
    }
Imparisyllabic answered 1/6, 2022 at 11:34 Comment(2)
Just add sheetContent and it would be solvedMultiplechoice
You can find all the Jetpack Compose Material 3 components here. ModalBottomSheetLayout is not yet ported to Material 3. Lot of components are still Work In Progress.Saveloy
P
3

Maybe this will help you or you make do it

implementation 'androidx.compose.ui:ui:1.4.3'
implementation 'androidx.compose.ui:ui-tooling'
implementation 'androidx.compose.ui:ui-graphics'
implementation 'androidx.compose.ui:ui-tooling-preview'
implementation 'androidx.compose.material3:material3:1.1.1'

yes i just added the latest stable version

Propagable answered 2/7, 2023 at 9:23 Comment(2)
Maybe? You guess? You can improve your answer by providing proof (code and a screenshot) that it doesn't work for older versions of those packages and then proof that it works with the latest versions. The code would be something that uses ModalBottomSheetLayout. You don't have to provide all the files because every Android project is quite large but app/build.gradle and MainActivity.kt should suffice.Catchment
In my case it helped, I am using the latest version of android studio and componentsPropagable
K
2

Based on this package summary it is not currently available in Material 3 for Compose.

Kolomna answered 1/6, 2022 at 16:15 Comment(0)
F
1

Try using ModalBottomSheet instead of ModalBottomSheetLayout.

Fabrice answered 29/3 at 11:8 Comment(0)
E
0

As in material3 version 1.1.0-alpha08 bottom sheet are experimental. Original post: https://mcmap.net/q/419710/-how-to-implement-bottomsheet-in-material-3-jetpack-compose-android

Eggleston answered 8/4, 2023 at 21:27 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.