weight

fun Modifier.weight(weight: Float, fill: Boolean = true): Modifier(source)

Appends weighted parent-data behavior to this modifier chain.

The parent row consumes the innermost weight provider on the direct child chain.

Return

this chain with weighted parent-data behavior appended.

Parameters

weight

the positive finite allocation weight.

fill

whether the child receives the complete allocated main-axis slot.

Throws

when weight is non-positive or non-finite.

when this scope has escaped its callback or constructing thread.