var name by remember {mutableStateOf("") }
在compose中使用上面的進行賦值時桂塞,出現(xiàn)如下報錯信息:
Type 'TypeVariable(T)' has no method 'getValue(Nothing?, KProperty<*>)' and thus it cannot serve as a delegate
解決方法
導(dǎo)入androidx.compose.runtime.getValue
import androidx.compose.runtime.getValue