I see this function in the source code of androidx.compose.ui.layout.SubcomposeLayout.kt in androidx.compose.ui:ui:1.0.0-beta02.
private fun createMeasurePolicy( block: SubcomposeMeasureScope.(Constraints) -> MeasureResult ): MeasurePolicy = object : LayoutNode.NoIntrinsicsMeasurePolicy( error = "Intrinsic measurements are not currently supported by SubcomposeLayout" ) { ... } It looks like I can't use intrinsic measurement when the composable will be rendered within a subcomposable.
For reference, I'm trying to use a view like this inside a ModalBottomSheet. The intention is to have a scrollable view within the sheet, with a sticky view always at the bottom (like a button). I'd like the scrollable content to only take up as much space as it needs, and not always be full screen when in the sheets expanded state, which weight(1f) does.
Column( modifier = Modifier .height(IntrinsicSize.Min) .wrapContentHeight(Alignment.Bottom), verticalArrangement = Arrangement.Bottom ) { Column( content = sheetContent, modifier = Modifier .weight(1f) .wrapContentHeight(Alignment.Bottom) ) Box { bottomStickyContent?.let { it() } } }