androidx.compose.foundation.layout
recalculateWindowInsetsSince 1.8
Function · from org.jetbrains.compose.foundation:foundation-layout:1.12.2
No hand-written docs yet.
This recalculates the WindowInsets based on the size and position. 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 recalculateWindowInsets. If the Constraints sizes aren't fixed, recalculateWindowInsets won't adjust the WindowInsets and won't have any affect on layout.
Parameters
fun Modifier.recalculateWindowInsets(): Modifier
Library docs
This recalculates the WindowInsets based on the size and position. 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
recalculateWindowInsets. If the Constraints sizes aren't fixed, recalculateWindowInsets
won't adjust the WindowInsets and won't have any affect on layout.
recalculateWindowInsets is useful when the parent does not call consumeWindowInsets when it
aligns a child. For example, a Column with two children should have different WindowInsets
for each child. The top item should exclude insets below its bottom and the bottom item should
exclude the top insets, but the Column can't assign different insets for different children.