Can I get the height of a child composable functio...
# compose
d
Can I get the height of a child composable function if I pass it as a parameter? example:
Copy code
fun CustomBottomDrawerLayout(
        drawerState: DrawerState,
        onStateChange: (DrawerState) -> Unit,
        gesturesEnabled: Boolean = true,
        drawerShape: Shape = MaterialTheme.shapes.large,
        drawerElevation: Dp = DrawerConstants.DefaultElevation,
        drawerContent: @Composable() () -> Unit,
        bodyContent: @Composable() () -> Unit
) {
Can I calculate the height of the drawerContent?
t
You could also wrap the child by a box and add a .OnPositioned modifier. But in my tests this not works well for animations because the position reading is one frame behind