title: how to change button color of that which is tapped in flutter using ListView
body: <p>I have created buttons using <code>ListView.builder</code>, now i want if i tapped on any button than only that button color should change, but when i tap on any button all buttons color are changing.</p>
  <p>here is the code</p>
  <pre><code>List&lt;String&gt; litems = [&quot;Counter No 1&quot;, &quot;Counter No 2&quot;, &quot;Counter No 3&quot;, &quot;Counter No 4&quot;];
  bool pressAttention=false;
  
   Widget build(BuildContext context) {
      return SafeArea(
          child: SingleChildScrollView(
                  SizedBox(
                    height: MediaQuery.of(context).size.height,
                    child: ListView.builder(
                        shrinkWrap: true,
                        itemCount: litems.length,
                        itemBuilder: (BuildContext ctxt, int index) {
                          return Column(
                            children: [
                              Container(
                                height: 55.0,
                                width: MediaQuery.of(context).size.width*0.9,
                                child: new RaisedButton(
                                child: new Text(litems[index]),
                                textColor: Colors.white,
                                shape: new RoundedRectangleBorder(
                                  borderRadius: new BorderRadius.circular(30.0),
                                ),
                                color: pressAttention ? Colors.green : Colors.grey,
                                onPressed: () =&gt; setState(() =&gt; pressAttention = !pressAttention), 
                        ),
  
                        
                              ),
                              SizedBox20(),
                            ],
                          );
                          
                        }),
                        
                    ),
  );
    }
  }
  </code></pre>
  <p>please help if any one know how to do this.</p>