Updated to canary 13 with alpha04 and found that m...
# compose
j
Updated to canary 13 with alpha04 and found that my imports for Modifiers need a package change from :
Copy code
import androidx.compose.foundation.layout.RowScope.weight
to
Copy code
import androidx.compose.foundation.layout.RowScope.Companion.weight
Has anyone else experienced this? The IDE doesn't suggest the change, had to stumble into it myself
r
this was discussed here just yesterday
j
I'll look, my apologies
a
These are not meant to be statically imported at all; expect this to change again such that the latter doesn't work either. 🙂 If you are using these modifiers directly in a Row or Column, they are already available and do not need to be imported. If you are using them at the top level of an unrelated composable function, you should declare that function as an extension of RowScope or ColumnScope, which will enforce that they must be used inside a Row or Column and also make the child modifiers available
🙏 1
j
Much appreciated on the response + explanation. I was using
LazyColumnFor()
and my
weight
modifier went red. Got it all sorted with your helps thanks again
a
Ah, then yes, chances are it wasn't doing anything for you there anyway 🙂
👍 1