androidx.compose.foundation.layout
fitOutsideSince 1.9
Function · from org.jetbrains.compose.foundation:foundation-layout:1.12.2
No hand-written docs yet.
If one of the Rulers in rulers has a value within the bounds of the Layout, this sizes the content to that Ruler and the edge. If multiple Rulers have a value within the space, only one is chosen, in this order: RectRulers.left, RectRulers.top, RectRulers.right, RectRulers.bottom. 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 fitOutside. If the Constraints sizes aren't fixed, or there are no Rulers within the bounds of the layout, fitOutside will size the content area to 0x0.
Parameters
fun Modifier.fitOutside(rulers: RectRulers): Modifier
rulers: RectRulersRequired
rulers: RectRulersRequiredNot described.
Library docs
If one of the Rulers in rulers has a value within the bounds of the Layout, this sizes the
content to that Ruler and the edge. If multiple Rulers have a value within the space, only
one is chosen, in this order: RectRulers.left, RectRulers.top, RectRulers.right,
RectRulers.bottom. 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 fitOutside. If the Constraints sizes aren't fixed, or there are no Rulers
within the bounds of the layout, fitOutside will size the content area to 0x0.