<h2 id="onconsumedwindowinsetschanged-block-consumedwindowinsets">onConsumedWindowInsetsChanged</h2>

<div class='sourceset sourceset-common'>Common</div>

```kotlin
fun Modifier.onConsumedWindowInsetsChanged(block: (consumedWindowInsets: WindowInsets) -> Unit) =
    this then
        ConsumedInsetsModifierElement(
            block,
            debugInspectorInfo {
                name = "onConsumedWindowInsetsChanged"
                properties["block"] = block
            },
        )
```

Calls `block` with the [WindowInsets](/jetpack-compose/androidx.compose.foundation/foundation-layout/interfaces/WindowInsets) that have been consumed, either by [consumeWindowInsets](/jetpack-compose/androidx.compose.foundation/foundation-layout/modifiers/consumeWindowInsets) or
one of the padding Modifiers, such as [imePadding](/jetpack-compose/androidx.compose.foundation/foundation-layout/modifiers/imePadding).

`block` can be called before or during measurement and layout. It should not be used to trigger
changes to composition because composition will only be applied on the following frame, leading
to the UI lagging WindowInsets by a frame.