How to make TopAppBar in a BottomSheetScaffold transparent? I want the hamburger icon and the name of the App overlayed over the map beneath. Setting backgroundColor to transparent with any alpha value is not working. Using compose version 1.0.5.
Here is the scaffold code:
BottomSheetScaffold(
topBar = {
TopAppBar(
title = { Text("App") },
backgroundColor = Color.Transparent.copy(alpha = 0.1f),
navigationIcon = {
IconButton(onClick = {
scope.launch {
bottomSheetScaffoldState.drawerState.apply {
if (isClosed) open() else close()
}
}
}) {
Icon(Icons.Default.Menu, "Open/Close menu")
}
}
)
},
scaffoldState = bottomSheetScaffoldState,
drawerGesturesEnabled = false,
drawerContent = {
DrawerContent(actions) {
scope.launch {
bottomSheetScaffoldState.drawerState.apply {
close()
}
}
}
},
floatingActionButton = {
FloatingActionButton(
onClick = {
},
backgroundColor = MaterialTheme.colors.secondary,
modifier = Modifier.padding(bottom = 100.dp),
) {
Icon(Icons.Filled.Add, contentDescription = "Add")
}
},
sheetContent = {
},
sheetPeekHeight = 0.dp,
) {
MapScreen(viewModel = viewModel)
}
