I'm developing, using Firebase as a backend, an application that works online and offline. The event (which has missions) is created and edited online, and when it is going to be "played", the application needs to start working offline. For that, I need to pass all the data of an 'Event' to the local device.
At this moment of transition between online/offline, the logical solution I found was to create data types within Flutterflow, replicating the same collection structure that I have in Firebase. So, I created an App State Event (Data type: Event), and when the user clicks on the "Play" button, everything inside the Event in Firebase is copied to this app state.
However, within the Event there is a list of missions (document references), and when looking for something in Firebase to save in the App State, I cannot save the reference only, because the App State Events needs to receive all the content of the Mission documents, because it will work offline.
I am not able to do this in Flutterflow. I've tried creating a loop to take the reference for each document, create a new field within the data type, and go on like that, but I haven't found the logic to iterate through the list.
Does anyone know any documentation or information that could help me get this online/offline transition, passing a list of references to a data type within an App State?