FlexMeasurer

fun interface FlexMeasurer(source)

Callback used by FlexboxEngine to determine an item's size.

To avoid violating Compose's single-measurement contract, implementations should use intrinsic measurements rather than Measurable.measure when integrating with Compose Layout.

Return

(width, height) in pixels

Parameters

maxWidth

the final width constraint in px, or null when unconstrained

maxHeight

the final height constraint in px, or null when unconstrained

Functions

Link copied to clipboard
abstract fun measure(maxWidth: Float?, maxHeight: Float?): Pair<Float, Float>