JoacoMaurtua
 · CEO at Nebulabs

Difficulty Managing Nested Lists in App State for Material Selection UI (associateMaterialList → materials)

Actions & Logic

I'm building a construction app where an Associate can have multiple types of materials, and each material type can contain several material varieties. The data model uses two custom DataTypes:

  • associateMaterialCategory

    → contains a material_type_name and a list of materialDataType

  • materialDataType → contains material_name, availability, and material_category_name

In the UI, I want to allow users to add multiple material types (each with its own list of varieties) dynamically and edit them inline. Each material type container has:

  • A dropdown to select the material_type_name

  • A ListView of nested materialDataType entries (varieties), with a dropdown for material_name, a toggle for availability, and an "Add variety" button

All of this is stored temporarily in the App State variable associateMaterialList: List<associateMaterialCategory> before being saved to Firestore.

What have you tried so far?

We’ve spent significant effort building this logic with nested lists using only FlutterFlow’s visual editor (no custom widgets). We’ve tried:

  1. Using associateMaterialList -> Item in List -> Data Structure Field -> materials to dynamically bind each material type’s varieties.

  2. Creating component inputs with index to try referencing subitems, but index in list is unreliable in nested ListViews.

  3. Attempting Map List Items and Data Structure Field, but the last step always forces us into an undesired transformation like Filter List Items or Item at Index, and never shows No Further Changes.

  4. Creating custom actions to update specific items in nested lists — but this approach became error-prone and ultimately unmaintainable.

  5. We've used temporary App States like varietyMaterialList, but they break when multiple material types are added because they don’t map per-index cleanly.

We’ve hit a blocker where:

  • Selecting a dropdown option inside a nested variety is updating all items instead of one

  • We cannot find a reliable way to bind a nested material list inside associateMaterialCategory and then update individual fields from dropdowns or switches

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