Cannot write or create empty list of custom data types into firestore

Troubleshooting

Whenever I try to update a firestore document in flutter flow with a field that is a list of custom data type, it does not go through and often crashes the build giving me the "build failed" screen. However, I can still add an array of maps in my firestore collection with dummy data and read/ display in flutterflow. In my case I have a collection called "songlists" with fields of name: string, and songs: array of maps. In flutter flow the scheme is set as name: string, and songs: <List(Data Type: Song)>. The song custom data type just has string and integer fields. No matter what I try, either no songs are being updated in firestore, or I get the "build failed" screen with no output in the console.

Note: the songlist field of (name: string) read and writes to firestore with no problem.

Note: The FF project is dependent on another deployed library FF project where these schemes and data types are created. I am also trying to create a document on button press, and also testing with component/page state variables populated with values, and with unpopulated values.

What have you tried so far?
  • I can store custom data types as page variables, update them, display their fields, print their fields to the console, etc.

  • Removing an create/update firestore actions lets the build compile. I made a test page state variable of a list<Data type(song)> with an initialized song. I am able to access/display/ and print to console its fields. However, on the debug panel, FF labels them as null. Not sure why.

  • I have tried setting the songs field as an empty list of type List<DataType: Song> in flutter flow and the build crashes.

  • I have made a custom function that returns type of List<DataType: Song> as an empty list [ ] and set the value of the songs field to it during document creation. The build fails.

  • I have tried setting the songs field type to "Set Value" with a page state variable of List<DataType:Song>, no luck, and build fails

  • I have tried I have tried setting the songs field type to "First Value" with a Create Data Type Object, initializing all fields of Song, and nothing happens in firestore.

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