ConsumeInsets

fun ConsumeInsets(maximumValue: Margin? = null, block: @Composable (Margin) -> Unit)

Consume LocalViewInsets for the execution of block. This will consume all available insets unless maximumValue is set.

The parameter to block is the actual insets that were consumed.

Note that this function does not apply to the code preceding or following the caller, so it is possible for insets to be consumed multiple times. In layouts like Box, this may be the desired behavior.