oday
12/10/2021, 7:03 AMweight
Modifier? just goes unresolved, no hint to import or anything, using Compose 1.0.5
Zoltan Demant
12/10/2021, 7:05 AMcontent
block for Column/Row by way of their scopes.
The scope provides this function
@Stable
fun Modifier.weight(
/*@FloatRange(from = 0.0, fromInclusive = false)*/
weight: Float,
fill: Boolean = true
): Modifier
oday
12/10/2021, 7:06 AMColumn(modifier = Modifier.weight(1f)) {
Text(text = "Hello")
Text(text = name)
}
right?oday
12/10/2021, 7:07 AMTin Tran
12/10/2021, 7:07 AMColumn() {
Text(text = "Hello", Modifier.weight(1f))
Text(text = name, Modifier.weight(1f))
}
Like thismaciejciemiega
12/10/2021, 7:08 AM{ }
of a Column. Unless your Column is in another Column (or Row)oday
12/10/2021, 7:08 AMmaciejciemiega
12/10/2021, 7:09 AModay
12/10/2021, 7:09 AModay
12/10/2021, 7:09 AM