Conditional colouring of container based on API text field

Hello,

I have an API call that returns a list of items. Some of these items contain "Text1", some of these contain "Text2" etc. I have placed each item inside a container in FlutterFlow, and I would like to paint these containers with different colours depending on whether I get Text1, Text2 etc. as the reply of the API. E.g. I would like the containers of Text1 to be red, of Text2 to be blue etc. How can I do that in FlutterFlow? Thank you!

3 replies