We can have Navigation Drawer in JetpackCompose by using Scaffold as below
Scaffold(
drawerContent = { Text(text ="Drawer") }
) {}
I want to make the width of the drawer larger. How can I do so? like the green arrow.
fun customShape() = object : Shape {
override fun createOutline(
size: Size,
layoutDirection: LayoutDirection,
density: Density
): Outline {
return Outline.Rectangle(Rect(0f, 0f, size.width+150, size.height))
}
}
Scaffold(
scaffoldState = state,
drawerShape = customShape(),
drawerContent = {Box(modifier = Modifier
.fillMaxWidth()
.fillMaxHeight()
.background(color = Color.Red)){
Text("draer")
}
},
content = {}
)