title: How do i change only the chosen option in listview in flutter
body: <p>I am trying to display the answer user have chosen.</p>
  <p>In the code below i have fetched a list of quizzes and displayed. I tried to change the background color of the chosen option by the user to different color than the others but when i execute the codes all of the quizzes get affected.</p>
  <p>Please suggest a simple and easy way because i am not really a programmer of flutter developer i am just learning and have gotten quite not far.</p>
  <p>Thanks in advance</p>
  <pre><code>
    Widget MyQuizzesCardUI(String question, String OptionID, String Option1, String Option2, String Option3, String Option4, String MyChoice, String Status, int index) {
      bool opt1 = false;
      bool opt2 = false;
      return Container(
        padding: EdgeInsets.all(10),
        decoration: BoxDecoration(
            borderRadius: BorderRadius.circular(8),
            border: Border.all(color: Color(0xffefefef), width: 0.5)),
        child: Column(
          children: [
            Container(
                child: Column(
                    mainAxisAlignment: MainAxisAlignment.spaceAround,
                    children: [
                      Container(
                        child: InkWell(
                          onTap: () {
                            opt1 = true;
                            opt2 = false;
                            setState(() {
                              opt1 = true;
                              opt2 = false;
                            });
                          },
                          child: Align(
                            alignment: Alignment.centerLeft,
                            child: Container(
                              width: double.infinity,
                              padding: EdgeInsets.all(10),
                              decoration: BoxDecoration(
                                color: opt1 ? Color(0xffa4c3ff) : Colors.white,
                              ),
                              child: Text(
                                &quot;${Option1}&quot;,
                              ),
                            ),
                          ),
                        ),
                      ),
                      Container(
                        child: InkWell(
                          onTap: () {
                            opt1 = false;
                            opt2 = true;
                            setState(() {
                              opt1 = false;
                              opt2 = true;
                            });
                          },
                          child: Align(
                            alignment: Alignment.centerLeft,
                            child: Container(
                              width: double.infinity,
                              padding: EdgeInsets.all(10),
                              decoration: BoxDecoration(
                                color: opt2 ? Color(0xffa4c3ff) : Colors.white,
                              ),
                              child: Text(
                                &quot;${Option2}&quot;,
                              ),
                            ),
                          ),
                        ),
                      ),
                    ]
                ))
          ],
        ),
      );
    }
  
  
  
  </code></pre>