by @alexstyl
✉️ Leave your feedback

← Back to Foundation Layout

requiredSizeIn

Modifier
in
Foundation Layout
. Since 1.0.0

Overview

Examples

Community Notes

Constrain the width of the content to be between minWidthdp and maxWidthdp, and the height of the content to be between minHeightdp and maxHeightdp. 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.

Overloads

requiredSizeIn

fun Modifier.requiredSizeIn(
    minWidth: Dp = Dp.Unspecified,
    minHeight: Dp = Dp.Unspecified,
    maxWidth: Dp = Dp.Unspecified,
    maxHeight: Dp = Dp.Unspecified
)
Next ComponentAlignmentLineOffset