Shabinder Singh
06/27/2021, 2:05 PMNipun Rajput
06/28/2021, 4:10 AMShabinder Singh
06/28/2021, 4:23 AMNipun Rajput
06/28/2021, 4:25 AMShabinder Singh
06/28/2021, 4:26 AMIan Lake
06/29/2021, 12:22 AMNavHost
in Box(Modifier.fillMaxSize())
, but adding the same fillMaxSize()
to the NavHost
itself doesn't fix it, which leads me to believe something odd is going on in BottomSheetScaffold
.NormalBottomSheet
by swapping out your sheetContent
for:
sheetContent = {
var callback by remember { mutableStateOf<(() -> Unit)?>(null) }
LaunchedEffect(Unit) {
// Set the callback after the initial composition
callback = {
callback = null
}
}
if (callback != null) {
FirstScreen(callback)
}
},
I.e., showing no content on the first composition (which is what NavHost
does, since it internally uses DisposableEffect
)callback
there to set it to null just hides the drawer entirely, but maybe that's expected if you don't have any content)NormalBottomSheet
by again surrounding it with a Box(Modifier.fillMaxSize())
Shabinder Singh
06/29/2021, 3:22 AM