flutter_form_builder for array of objects

136 views Asked by At

How do I get an array of objects using flutter_form_builder and ListView? the object:

{
  items: [
    {
       id: xx,
       name: xxxx
    }
  ]
}

What I have tried:

return FormBuilder(
   key: widget.formKey,
   child: ListView.builder(
     shrinkWrap: true,
     itemCount: items.length,
     itemBuilder: (context, index) {
       return FormFieldBuilder(
          child: Row(
            children: [
               FormBuilderTextField(name: 'id'),
               FormBuilderTextField(name: 'name'),
            ]
          )
       );
     }
   )
)

0

There are 0 answers