requiredHeightIn
Compose Modifier
Common
fun Modifier.requiredHeightIn(min: Dp = Dp.Unspecified, max: Dp = Dp.Unspecified) =
this.then(
SizeElement(
minHeight = min,
maxHeight = max,
enforceIncoming = false,
inspectorInfo =
debugInspectorInfo {
name = "requiredHeightIn"
properties["min"] = min
properties["max"] = max
},
)
)
Constrain the height of the content to be between min
dp and max
dp. If the content chooses a
size that does not satisfy the incoming Constraints
, the parent layout will be reported a size
coerced in the Constraints
, and the position of the content will be automatically offset to be
centered on the space assigned to the child by the parent layout under the assumption that
Constraints
were respected.