offset

Function

Common
fun Constraints.offset(horizontal: Int = 0, vertical: Int = 0) =
    Constraints(
        (minWidth + horizontal).fastCoerceAtLeast(0),
        addMaxWithMinimum(maxWidth, horizontal),
        (minHeight + vertical).fastCoerceAtLeast(0),
        addMaxWithMinimum(maxHeight, vertical),
    )

Returns the Constraints obtained by offsetting the current instance with the given values.