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 AMShabinder Singh
06/28/2021, 5:23 PMIan 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
.Ian Lake
06/29/2021, 12:24 AMNormalBottomSheet
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
)Ian Lake
06/29/2021, 12:25 AMcallback
there to set it to null just hides the drawer entirely, but maybe that's expected if you don't have any content)Ian Lake
06/29/2021, 12:26 AMNormalBottomSheet
by again surrounding it with a Box(Modifier.fillMaxSize())
Shabinder Singh
06/29/2021, 3:22 AM