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 ofmaterialDataType
materialDataType
→ containsmaterial_name
,availability
, andmaterial_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 formaterial_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.