Why for -Var isSelected -Val backgroundColor I'm g...
# compose
s
Why for -Var isSelected -Val backgroundColor I'm getting weird error: "Type 'TypeVariable(T)' has no method 'getValue(Nothing?, KProperty<*>)' and thus it cannot serve as a delegate" when using 'by' keyword. No error when using '='
j
You may need to add the imports
Copy code
import androidx.compose.runtime.setValue
import androidx.compose.runtime.getValue
🙌 2
m
you need to add imports manually, Android Studio doesn’t do that at the moment
Copy code
import androidx.compose.runtime.setValue
import androidx.compose.runtime.getValue
🙏 1
🙌 2