size

fun Modifier.size(width: Int, height: Int): Modifier(source)

Constrains both axes to exact requested sizes after clamping them into the parent constraints. The new behavior is appended inside the existing modifier chain.

Return

this chain with one appended size modifier.

Parameters

width

the requested non-negative width.

height

the requested non-negative height.

Throws

when either requested size is negative.