query regarding firestore query collection and app state of type list

Actions & Logic
Resolved

Hi FlutterFlow Community,

I'm currently working on a project where I have a Firestore collection for a shopping cart, from which I'm fetching services based on customer ID and category type using Firestore query collection features in FlutterFlow.

I've also set up an app state of type reference ID, which can store a list of service ID references obtained from the cart query collection. Now, when it comes to booking, I aim to store this list of service IDs in the app state and then transfer it to the booking collection.

Could anyone guide me on how to effectively integrate Firestore queries and app state to achieve this booking functionality? Any insights or code examples would be greatly appreciated.

Thanks in advance!

What have you tried so far?

I've created a local variable named listCount for storing count of number of items in a list, and implemented a loop with condition that loop runs until the variable value becomes 0. inside that loop I've run a firestore query collection for fetching single document from the cart on the basis of customer id and its category type and after that add an action to add value in app state and at end of the loop I've decremented the value of local variable by one.
but this is not working.

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