I don't understand what's going on with this. I'm ...
# compose
c
I don't understand what's going on with this. I'm getting an error copying the
ModalNavigationDrawer
example from online. The documentation says the
ModalDrawerSheet
takes a
DrawerState
argument, but the IDE insists it doesn't.
e
Seems like a modifier is required. Try giving a named argument
Copy code
ModalDrawerSheet(modifier = Modifier, drawerState = drawerState)
c
drawerState
isn't a valid argument at all.
i
It is the
ModalNavigationDrawer
that takes a
DrawerState
, not the
ModalBottomSheet
. Which example are you reading? Because the official docs look correct: https://developer.android.com/develop/ui/compose/components/drawer#control
c
image.png
c
I'm just using
Copy code
import androidx.compose.material3.ModalDrawerSheet
import androidx.compose.material3.ModalNavigationDrawer
I guess the other version isn't available for some reason?
Do I need to update the material 3 libraries? And if so, how do I do that?