How can I get Radio to work on flutter when using dynamic object? : I'm new to flutter and I have issues with Radio.
I got it to work perfectly when using the "regular" method:

    int _groupValue=-1;
    ...
    ...
    child: Align(
                    alignment: Alignment.center,
                    child: Column(
                      children: <Widget>[
                        RadioListTile(activeColor: Colors.black,
                          groupValue: _groupValue,
                          value: 1,
                          onChanged: (value) { setState(() {
                            _groupValue=value;
                          });  },
                          title: Text("a"),
                        ),
                        RadioListTile(activeColor: Colors.black,
                          groupValue: _groupValue,
                          value: 2,
                          onChanged: (value) { setState(() {
                            _groupValue=value;
                          });  },
    
                          title: Text("b"),
                        ),
                      ],
                    ),
                  ),

Since i'm using data from API to create the radio buttons i've changed this code to this:

    child: Align(
                        alignment: Alignment.center,
                        child:            children: radioListView
                        ),
                      ),

and on click of a button i call async method to download the data from the API and like this :

    void getApiData() async {
        ...
        ...
        ...
        setState() { 
            var radioListView = List<RadioListTile>();
            for (Map<String, dynamic> c in apidata)) {
              radioListView.add(new RadioListTile(
                groupValue: _groupValue,
                  value: c['option_value'],
                title: c['title'],
                onChanged: (value) { setState(() {
                            _groupValue=value;
                          });
                ),
                
              ));
          }
        }
    } 

using the first code it works but using the second code i just get to see the items but nothing happens when i click on the radio buttons (although the onchanged does triggers because i tried to print the value and it's fine)
what am I doing wrong ?
