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 inandroidx.compose.ui.unit.Dp.Percent: Uses a fraction of the container's main axis size.
Functions
toString
override fun toString(): String
Members
Companion
public companion object
Properties
Auto
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
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
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. |