Issue accessing values in AppState JSON Array

Actions & Logic

Hi,
Here is what I am doing:
- Fetch data from Firebase via API and store it as JSON array in AppState variable
- Later, a component is trying to access values

Issue:
- When I simply access the value to show in a text widget, it shows me correct string value.
- When I try to access the same string vakue to build a Conditional Builder, it does not recognize it as a string value.

What have you tried so far?

This is what I have tried:

This is my App State variable.


Structure of JSON stored looks like this:

{
  "documents": [
    {
      "id": "XYZ",
      "date": {
        "_seconds": 1740908314,
        "_nanoseconds": 395999000
      },
      "pollTitle": "Some Title here",
      "pollType": "T2",
      "userID": {
        "_firestore": {
          "projectId": "abc_123"
        },
        "_path": {
          "segments": [
            "users",
            "randonuserID"
          ]
        },
        "_converter": {}
      }
    },
    {
      "id": "XYZ",
      "date": {
        "_seconds": 1740908314,
        "_nanoseconds": 395999000
      },
      "pollTitle": "Some Title here",
      "pollType": "T2",
      "userID": {
        "_firestore": {
          "projectId": "abc_123"
        },
        "_path": {
          "segments": [
            "users",
            "randonuserID"
          ]
        },
        "_converter": {}
      }
    }
]
}

I am trying to access "pollType": "T2"

When I try to fetch the value to display in this text field, I am getting the result and text is displayed.


But when I try to create a Condition Builder so that I can show different content based on the value of "pollType" the condition builder is asking to provide JSON comparison value instead of a String.


What am I doing wrong?

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