derivedWindowInsetsTypeOf

fun derivedWindowInsetsTypeOf(vararg types: WindowInsets.Type): WindowInsets.Type

Returns an instance of WindowInsets.Type whose values are calculated and derived from the WindowInsets.Type instances passed in to types.

Each WindowInsets.Type passed in will be coerced with each other, such that the maximum value for each dimension is calculated and used. This is typically used for two purposes:

  1. Creating semantic types. WindowInsets.systemBars is a good example, as it is the derived insets of WindowInsets.statusBars and WindowInsets.navigationBars.

  2. Combining insets for specific usages. navigationBarsWithImePadding is a good example, as it is the derived insets of the WindowInsets.ime insets, coerced by the WindowInsets.navigationBars insets.