The key point here is that you are using a same groupValue: selectedRadio, Each radio button group must have different groupValue otherwise it will shared the same change.
If you do not want to specify name for each radio button group you can just create a new .dart file like this:
import 'package:flutter/material.dart';
class buildCheckListItems extends StatefulWidget {
final int index;
buildCheckListItems(this.index); //I don't know what is this index for but I will put it in anyway
@override
_buildCheckListItemsState createState() => _buildCheckListItemsState();
}
class _buildCheckListItemsState extends State<buildCheckListItems> {
int selectedRadio = -1;
changeValue(int val) {
setState(() {
selectedRadio = val;
});
}
@override
Widget build(BuildContext context) {
return Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: <Widget>[
...
],
);
}
}
The key point here is that you are using a same `groupValue: selectedRadio,` Each radio button group must have different `groupValue` otherwise it will shared the same change.
If you do not want to specify name for each radio button group you can just create a new .dart file:
```
import 'package:flutter/material.dart';
class buildCheckListItems extends StatefulWidget {
final int index;
buildCheckListItems(this.index); //I don't know what is this index for but I will put it in anyway
@override
_buildCheckListItemsState createState() => _buildCheckListItemsState();
}
class _buildCheckListItemsState extends State<buildCheckListItems> {
int selectedRadio = -1;
changeValue(int val) {
setState(() {
selectedRadio = val;
});
}
@override
Widget build(BuildContext context) {
return Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: <Widget>[
...
],
);
}
}
```
and now everything should be working just fine.