title: Flutter - How do I toggle the color of a FlatButton upon click?
body: <p>I want to change the color when the <code>FlatButton</code> is pressed. Thanks for your help.</p>
  
  <pre><code>import 'package:flutter/material.dart';
  
  class ButtonCalculate extends StatelessWidget {
  
  @override
  Widget build(BuildContext context) {
  var container = Container(
    decoration: BoxDecoration(gradient: null,
    borderRadius: BorderRadius.circular(20.0),
    //color: Colors.amber,
    boxShadow: [
      BoxShadow(
        color: Colors.black12,
        offset: Offset(0.0, 0.5),
        blurRadius: 40.5,
      ),
    ]),
    child: new FlatButton(
      child: Image(
        image:AssetImage('assets/2.0x/Button_Calculate.png')),
      onPressed: () {},
    ),
    width: 290.0,
  );
  </code></pre>