Davide Giuseppe Farella
12/17/2022, 4:43 PMstatusBarPadding
to the yellow box, but on the top bar, thus if the yellow box got removed, the top bar will be drawn behind the status barAlex Vanyo
12/19/2022, 6:37 PMDavide Giuseppe Farella
12/19/2022, 7:00 PMC
for simplicity.
C
doesn't know then if we have the yellow box or not, unless we measure them with a SubComposeLayout
, which I don't want to.
The quickest hack I found is something like this
fun C(
yellowBox: @Composable () -> Unit,
topBar: @Composable () -> Unit
) {
val statusBarHeight = Insets...
Column {
Box(Modifier.heigthIn(min = statusBarHeight) {
yellowBox()
}
topBar()
}
}
What do you think about it?Alex Vanyo
12/19/2022, 7:06 PMyellowBox
as
yellowBox: (@Composable () -> Unit)?
And the null
would indicate that there is no yellowBox
, so you could change your inset application appropriatelyDavide Giuseppe Farella
12/19/2022, 7:10 PMnull
, but this could be a good time to use it .
Thank you 🙂