Flutter - dynamic forms

Viewed 21

I would like to create a dynamic form with TextEditingController built dynamically with information from a json file. For example, in my json file i have 2 fields

[
    {
        focusNode: nftNameFocusNode,
        controller: nftNameController,
        textInputAction: TextInputAction.next,
        labelText: 'name',
        autocorrect: false,
        keyboardType: TextInputType.text
    },
    {
        focusNode: nftDescFocusNode,
        controller: nftDescController,
        textInputAction: TextInputAction.next,
        labelText: 'description',
        autocorrect: false,
        keyboardType: TextInputType.text
    }
]

and i would like to generate 2 fields in my form

Thx

0 Answers
Related