title: How to select specific radio button and get its value in ListView.builder Flutter
body: <p>I would like to create a list of data that is called JSON with radio button. However, <strong>when I select any of the radio buttons it is selecting each and every radio button rather than selecting one.</strong> And, <strong>how can I get the selected radio button's value when I click on the button</strong>?</p>
  <p>I am new to flutter. Is it any solution can solve these type of problems?</p>
  <p>Here is my code</p>
  <pre><code>Widget build(BuildContext context) {
      return Scaffold(
          body: Column(
        children: &lt;Widget&gt;[
          Container(
              height: 270,
              color: Colors.white,
              child: CustomScrollView(
                slivers: [
                  SliverList(
                    delegate: SliverChildBuilderDelegate(
                      (context, i) {
                        return Column(
                          children: &lt;Widget&gt;[
                            Container(
                                width: 450,
                                padding: EdgeInsets.all(7.0),
                                margin: EdgeInsets.only(right: 8.0, left: 8.0, top: 10.0),
                                decoration: BoxDecoration(
                                  border: Border.all(color: const Color(0xffededed)),
                                ),
                                child: Row(
                                  mainAxisAlignment: MainAxisAlignment.start,
                                  mainAxisSize: MainAxisSize.max,
                                  children: &lt;Widget&gt; [
                                    Text(modelOptions[i].optionName.toString(),
                                      style: TextStyle(
                                        fontSize: 18,
                                        color: Colors.amber,
                                      ),
                                    ),
                                  ],
                                ),
                            ),
                            Container(
                                margin: EdgeInsets.only(left: 8.0, right: 8.0),
                                padding: EdgeInsets.all(7.0),
                                decoration: BoxDecoration(
                                  border:
                                      Border.all(color: const Color(0xffededed)),
                                ),
                                child: ListView.builder(
                                    shrinkWrap: true,
                                    physics: NeverScrollableScrollPhysics(),
                                    itemCount: modelOptions[i].modelOptionValues.length,
                                    itemBuilder: (context, j) {
                                      return
                                        Row(
                                          mainAxisAlignment: MainAxisAlignment.start,
                                          mainAxisSize: MainAxisSize.min,
                                        children: &lt;Widget&gt;[
                                          Radio(
                                              groupValue: selectedRadio,
                                              value: modelOptions[i].modelOptionValues[j].optionValueID,
                                              activeColor: Colors.orangeAccent,
                                              onChanged:(value) {
                                                setState(() {
                                                  value = modelOptions[i].modelOptionValues[j].optionValueID.toString();
                                                  selectedRadio = value;
                                                  print(&quot;check radio: ${selectedRadio}&quot;);
                                                  showToastMessage('${selectedRadio} is selected');  //get the selected radio button's value.
                                                });
                                              }),
                                                });
                                              }),
                                          Text(
                                            modelOptions[i].modelOptionValues[j].valueName,
                                            style: TextStyle(
                                              color: Colors.black, fontSize: 16,
                                          ),),
                                        ],
                                      );
                                    }))
                          ],
                        );
                      },
                      childCount: modelOptions.length,
                    ),
                  ),
                  
                ],
              )),
        ],
      ));
    }
  </code></pre>