The label parameter should be set so this animate*AsState can be better inspected in the Animation Preview.
Compose提示:
The label parameter should be set so this animate*AsState can be better inspected in the Animation Preview.
需要添加label标签:
label = "inspection label"
完整:
animateColorAsState(targetValue = if (enable.value) Color.Blue else Color.Yellow,
label = "inspection label"
)
最终效果:左侧有个运行按钮,可以直接运行到设备上。