Enrique Ruiz
 · FlutterFlow explorer

Complex data management with custom component

I'm quite new with FlutterFlow and I face a problem I know must be possible to solve.

I have a collection in Firestore, let's call it "containers". Every item ("container") has a property "items", which is an array of maps. Each "item" (map in the array) has the properties "name", "color" and "size".

Now, I want to manage a container from FlutterFlow. So, there's a section that shows all the info for a container. I have also created an "item" data type. To show the items array, I have created a component called "item_view", that receives the item (as data type "item") as parameter. The component has a state called "item_state" (another "item" data type).

My first problem is that I can't find a way to get to the "item_state" from the container section. I can get every field inside the component (because they are native components, I suppose), but not the custom component's one.

The second problem is that, even if I have a data type "item", when I try to send it to the API I created with cloud functions, there is no way to do it because it expects a JSON. Isn't there any easy, native way to trnasform a data type to its JSON expression?

Any help on this would be much appreciated!

1
2 replies