Function

requiredHeight

Declare the size of the content to be exactly height dp along the y dimension, disregarding the incoming VolumeConstraints.

RevenueCat

RevenueCat

Add subscriptions to your apps in minutes

Ad Get started for free

requiredHeight

Android
public fun SubspaceModifier.requiredHeight(height: Dp): SubspaceModifier

Declare the size of the content to be exactly height dp along the y dimension, disregarding the incoming VolumeConstraints.

This is in contrast to SubspaceModifier.height, which respects the parent's constraints. requiredHeight will ignore the minHeight and maxHeight from the incoming constraints, which can be useful for sizing an element to a specific value even if it exceeds the parent's bounds.