title: (Flutter) Select Effect on items in Grid View Builder?
body: <p>how to change the color of the CARD widget if one of the gridview items is clicked then CARD changes color. but you can only choose one item. how do i make it ???</p>
  
  <pre><code>Widget listDenomPulsa(AsyncSnapshot &lt;List&lt;Payload&gt;&gt; snapshot) {
      return GridView.builder(
          shrinkWrap: false,
          scrollDirection: Axis.vertical,
          itemCount: snapshot.data.length,
          gridDelegate: new SliverGridDelegateWithFixedCrossAxisCount(
            crossAxisCount: 2,
            childAspectRatio: MediaQuery.of(context).size.width / (MediaQuery.of(context).size.height / 3),
          ),
          itemBuilder: (BuildContext context, int index) {
            bool _selectItem = false;
            return GestureDetector(
              onTap: () {
                setState(() {
                    _selectItem = true;
                });
              },
              child: Card(
                color: _selectItem ? Colors.blue:Colors.amber,
                child: Container(
                  height: SizeConfig.heightMultiplier * 3,
                  child: Padding(
                    padding: EdgeInsets.all(SizeConfig.heightMultiplier * 3),
                    child: Text(
                      snapshot.data[index].desc,
                      style: AppTheme.styleSubTitleBlackSmall,
                    ),
                  ),
                ),
              ),
            );
          }
      );
    }
  </code></pre>