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

FlexBasis

Defines the initial main size of a flex item before free space distribution.

Source set: Common
public class FlexBasis internal constructor(@PublishedApi internal val packedValue: Long)

Defines the initial main size of a flex item before free space distribution.

  • Auto: Uses the item's explicitly set size, or falls back to its natural content size.
  • Dp: Uses a fixed exact size in androidx.compose.ui.unit.Dp.
  • Percent: Uses a fraction of the container's main axis size.

Functions

toString

Source set: Common
override fun toString(): String

Members

Companion

Source set: Common
public companion object

Properties

Auto

Source set: Common
public val Auto: FlexBasis

Use the item's maximum intrinsic size as the basis.

If the item has an explicitly set size modifier along the main axis (for example, Modifier.width in a FlexDirection.Row), that exact size will be used as the basis. Otherwise, it falls back to measuring the item's preferred natural content size without constraints.

This is the default value.

Functions

Dp

Source set: Common
public fun Dp(value: Dp): FlexBasis

Use a fixed size in androidx.compose.ui.unit.Dp as the basis.

Parameters

value The basis size in Dp.

Percent

Source set: Common
public fun Percent(@FloatRange(0.0, 1.0) value: Float): FlexBasis

Use a fraction of the container's main axis size as the basis.

Parameters

value A value between 0.0 and 1.0 representing the percentage.