🌈 Create new beautiful Compose Gradients with our new wesite ->
Interface

FlexConfig

Represents a configuration for a flex item within a FlexBox.

Source set: Common
public interface FlexConfig

Represents a configuration for a flex item within a FlexBox.

This configuration is defined via a lambda that operates on a FlexConfigScope. Because this configuration block is executed during the layout phase rather than the composition phase, reading state variables inside the block will only trigger a layout pass, completely avoiding costly recompositions.

Configuration properties are applied sequentially. If a property (such as grow or shrink) is assigned multiple times within the configuration block, the final call takes precedence.

Functions

configure

Source set: Common
public fun FlexConfigScope.configure()

Applies the configuration to the given FlexConfigScope.This method is invoked by the layout system during the measurement phase, not during composition.

then

Source set: Common
public infix fun then(other: FlexConfig): FlexConfig

Merges this config with another. Configs further "to the right" will override properties to the left of them, on a per-property basis.

Parameters

other the config to merge into the receiver.

Members

Companion

Source set: Common
public companion object : FlexConfig

Functions

configure

Source set: Common
override fun FlexConfigScope.configure()

then

Source set: Common
override fun then(other: FlexConfig): FlexConfig

Merging the identity with any config yields that config.