Skip to content

Instantly share code, notes, and snippets.

@lbenevento
Created September 6, 2021 13:35
Show Gist options
  • Save lbenevento/c2e1754bbf1098fb8211a9aa863b8aa8 to your computer and use it in GitHub Desktop.
Save lbenevento/c2e1754bbf1098fb8211a9aa863b8aa8 to your computer and use it in GitHub Desktop.
ModalBottomSheetLayout(
sheetContent = { SheetContent(Modifier.navigationBarsWithImePadding()) },
sheetState = sheetState
) {
Column {
// StatusBar Inset
Spacer(
modifier = Modifier
.background(MaterialTheme.colors.primary)
.statusBarsHeight()
.fillMaxWidth()
)
Scaffold(
topBar = { Toolbar() },
bottomBar = {
// NavigationBar Inset
Spacer(
modifier = Modifier
.background(MaterialTheme.colors.surface)
.navigationBarsHeight()
.fillMaxWidth()
)
}
) {
Column(Modifier.padding(it)) {
MainContent(
onClick = { coroutineScope.launch { sheetState.show() } }
)
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment