title: How to change the background color of raised button dynamically in onPressed()
body: <p>I have a list of Raised buttons, I want the background color of the selected button to change in its onPressed()</p>
  
  <p>I tried changing the color in setState but it doesn't do anything.</p>
  
  <p>This is the function that generates the list of Buttons</p>
  
  <pre><code>List&lt;Widget&gt; _makeZoneList(List&lt;Zone&gt; zones) {
      List&lt;Widget&gt;Buttons = new List();
      for (int i = 0; i &lt; zones.length; i++) {
        Buttons.add(RaisedButton(
          color: zones[i].isSelected ? AppColors.primaryColor : AppColors.white,
          onPressed: () {
            setState(() {
              if (zones[i].isSelected){
                zones[i].isSelected = false;
              }
              else{
                zones[i].isSelected = true;
              }
              print(zones[i].isSelected.toString());
            });
          },
          child: Text(zones.elementAt(i).text)
        ));
      }
      return Buttons;
    }
  </code></pre>
  
  <p>This is where I call the function</p>
  
  <pre><code>Widget _zoneBody() {
      return Padding(
          padding: EdgeInsets.all(32),
          child: StreamBuilder&lt;List&lt;Zone&gt;&gt;(
              stream: GetterBloc.zonesStream,
              builder: (context, snapshot) {
                if (snapshot.connectionState == ConnectionState.waiting) {
                  return new Container();
                } else {
                  if (snapshot.hasData) {
                       return Wrap(
                            spacing: 6.0, // gap between adjacent chips
                            children: _makeZoneList(snapshot.data));
  
                  } else {
                    return new Container();
                  }
                }
              }));
    }
  </code></pre>
  
  <p>When I press any button, its isSelected value changes but the background doesn't change accordingly</p>