CopyPastor

Detecting plagiarism made easy.

Score: 0.806534935958194; Reported for: String similarity Open both answers

Possible Plagiarism

Plagiarized on 2020-11-12
by Giridharan Venkatapathy

Original Post

Original - Posted on 2020-06-11
by Netnichaa



            
Present in both answers; Present only in the new answer; Present only in the old answer;

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.

        
Present in both answers; Present only in the new answer; Present only in the old answer;