Instead of setting colors manually,Is it possible to set the colors for different states(normal, highlighted, disabled)?
var color: Color { return condition ? .red : .blue }
So I have set the color change this way but is it possible to change it depending on the state? Instead of having to manually check for state and change colors? Something like this?
background(color, for: state)