androidx.compose.foundation.layout

fitInsideSince 1.9

Function · from org.jetbrains.compose.foundation:foundation-layout:1.12.2

No hand-written docs yet.

Fits the contents within rulers. This only works when Constraints have [fixed width]Constraints.hasFixedWidth and [fixed height]Constraints.hasFixedHeight. This can be accomplished, for example, by having Modifier.size, or Modifier.fillMaxSize, or other size modifier before fitInside. If the Constraints sizes aren't fixed, fitInside will size the child to the Constraints and try to center the content within rulers.

Parameters

fun Modifier.fitInside(rulers: RectRulers): Modifier

rulers: RectRulersRequired

Not described.

Library docs

Fits the contents within rulers. This only works when Constraints have [fixed width]Constraints.hasFixedWidth and [fixed height]Constraints.hasFixedHeight. This can be accomplished, for example, by having Modifier.size, or Modifier.fillMaxSize, or other size modifier before fitInside. If the Constraints sizes aren't fixed, fitInside will size the child to the Constraints and try to center the content within rulers.