androidx.compose.ui.layout

layout

Function · from org.jetbrains.compose.ui:ui:1.12.2

No hand-written docs yet.

Creates a LayoutModifier that allows changing how the wrapped element is measured and laid out.

Parameters

fun Modifier.layout(
    measure: MeasureScope.(Measurable, Constraints) -> MeasureResult,
)

measure: MeasureScope.(Measurable, Constraints) -> MeasureResultRequired

Not described.

Library docs

Creates a LayoutModifier that allows changing how the wrapped element is measured and laid out.

This is a convenience API of creating a custom LayoutModifier modifier, without having to create a class or an object that implements the LayoutModifier interface. The intrinsic measurements follow the default logic provided by the LayoutModifier.

Example usage: