Alexandru Hadăr
07/08/2023, 11:41 AMTextFieldColors functions all return State and not a color directly?
For instance, I don't see why the function below couldn't omit the rememerUpdatedState and only keep the if, since on recompositions it would be called again, thus returning a different value
@Composable
override fun textColor(enabled: Boolean): State<Color> {
return rememberUpdatedState(if (enabled) textColor else disabledTextColor)
}ephemient
07/08/2023, 12:04 PManimateColorAsState and by delaying reading the value it doesn't need to be recomposed on every frame