Container does not change colour on tap/click

The following widget should change the colors from `red` to `blue` when I tap/click. But it does not do anything. This widget is embedded in a `parent stateful widget`. What could be the issue?

```
Widget _myCard(BuildContext context, bool animationYESNO,
      String stringToDisplay, int index, Animation<double> animation) {

    Color highlightColour = Colors.redAccent;

    return Padding(
      padding: const EdgeInsets.all(2.0),
      child: GestureDetector(
          onTap: () {
            setState(() {
              highlightColour = Colors.blueAccent;
            }); 

            }
          },
          child: Container(
             color: highlightColour,

          )),
    );
  }

```