Guy Bieber
08/25/2020, 12:27 AMval mDataModel = remember {dataModel}
ui.TextLabelStyled(
text = "%.1f".format(mDataModel.value),
color = mDataModel.targetColor,
fontSize = valueFontSize,
modifier = Modifier
)
Is there a workaround?gildor
08/25/2020, 3:25 AMdataModel
?Guy Bieber
08/25/2020, 4:56 PMclass BasicStatusDataModel<T> (
var state: ControlState = ControlState(), // already mutable
targetColor : Color = nikolaColors.color3, // wrapped mutable
val transitionTimeoutMs : Long = 2*1000,
name : String = "", // wrapped mutable
value : T, // wrapped mutable
unit : String = "", // wrapped mutable
showActive : Boolean = false // wrapped mutable
) {
var targetColor by mutableStateOf(targetColor)
var name by mutableStateOf(name)
var value by mutableStateOf(value)
var unit by mutableStateOf(unit)
var showActive by mutableStateOf(showActive)
gildor
08/25/2020, 11:52 PMvalue
? Because it says that it mutableGuy Bieber
08/26/2020, 4:46 PM