0👍
Don’t assign Anonymous method to the backgroundColor property. write conditions inside a method and return color hashcode as string and just call that method from backgroundColor property .
For example , the method name is x which is returning the color code. then the code will be backgroundColor: x()
Source:stackexchange.com