measure
The function used to measure the modifier. The measurable corresponds to the wrapped content, and it can be measured with the desired constraints according to the logic of the LayoutModifier. The modifier needs to choose its own size, which can depend on the size chosen by the wrapped content (the obtained Placeable), if the wrapped content was measured. The size needs to be returned as part of a MeasureResult, alongside the placement logic of the Placeable, which defines how the wrapped content should be positioned inside the LayoutModifier. A convenient way to create the MeasureResult is to use the MeasureScope.layout factory function.
A LayoutModifier uses the same measurement and layout concepts and principles as a com.jakewharton.mosaic.ui.Layout, the only difference is that they apply to exactly one child. For a more detailed explanation of measurement and layout, see MeasurePolicy.