Parse JSON to generate dynamic children & bind to component

Integrations

Hi guys

I am struggling to finalize a filtering functionality for my app.

Due to several string lists & integer filters, I am using a google cloud function to filter a firestore collection, and returning a JSON including a documents list with 2 infos : the filtered document Doc Ref and a related Document Doc Ref.

Below a return example :

[{"trailLocaleReference":"trail_locale/6jbuY0XsKnvSQZJbM6kC","trailHeaderReference":"trail_header/LN5G0GKRTh2Ci0DLNDmU"},{"trailLocaleReference":"trail_locale/K1y6alxowjVFNXVw0a62","trailHeaderReference":"trail_header/jUPLru9fmgOENkBspAGr"},{"trailLocaleReference":"trail_locale/jvX7DVIBEcnwZ3U555nv","trailHeaderReference":"trail_header/ey3GUseHwHoSAa80jF8G"}]

I want to show the filtering results in a component listview on the search page, and allow user to click on the component to access the document's detailed view.

Yet I have troubles to :

  • Parse the JSON into a usable list to generate dynamic children (from a trail_locale query)

  • Bind the component using the Document Reference + bind the component's parameter (trailHeaderReference)

Do you have any insights to provide on how to proceed ? Or any docs/video to help me understand this issue? Thanks a lot

Attached screenshots to show my status

What have you tried so far?

Several setup using a JSON type Page State, and app state List based on a DataType structured with the 2 Doc Reference.

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