FlexConfig represents a configuration for a flex item within a FlexBox.

FlexConfig is implemented as a functional interface where the lambda is executed on FlexConfigScope during the layout phase.

Note: Configuration properties are not additive. If a property is assigned multiple times within the configuration block, the last assignment overrides previous values.

Example:

val growConfig = FlexConfig {
grow = 1f
alignSelf = AlignSelf.Center
}

Box(modifier = Modifier.flex(growConfig))

Summary

Public functions

Unit

Configures the flex item properties.

Cmn

Public functions

fun FlexConfigScope.configure(): Unit

Configures the flex item properties. Called during the layout phase, not during composition.