How to check if an app state variable List contains an item

Actions & Logic

On Count Changed action to the Count controller, I am trying to check if an item is already present in the SelectedItem List (App State Variable). If it is true, I want to update just the quantity else, I want to add a new entry into the SelectedItem (App State Variable List).

The App State Variable List includes a custom Data Type Object "Items" with details of the item added like the itemId, ItemName etc.

What have you tried so far?

I have tried using Conditional Action (both single and multiple conditions) List Contains Item. It doesnt check the condition at all and I get multiple entires of the same product on the On Count Changed action.

Did you check FlutterFlow's Documentation for this topic?
Yes
1