title: Can't get button press to work in flutter
body: <p>Ok I'm pretty new to flutter/ dart so go easy on me.  I'm just trying to make a very simple app where when you press a button some text updates telling you how many times you have pressed the button.  I have no idea why this code doesn't work.   The button appears but nothing happens when you press it.                                                                                                                                                                                                                                                                      </p>
  
  <pre><code>import 'package:flutter/material.dart';
  
  class Homepage extends StatelessWidget {
    @override
    Widget build(BuildContext context) {
      return new Column(
        children: &lt;Widget&gt;[],
      );
    }
  }
  
  class Buttonz extends StatefulWidget {
    @override
    _ButtonBeingPressed createState() =&gt; new _ButtonBeingPressed();
  }
  
  class _ButtonBeingPressed extends State&lt;Buttonz&gt; {
    int _timesPressed = 0;
    _buttonWasPressed() {
      setState(() {
        _timesPressed++;
      });
    }
  
    @override
    Widget build(BuildContext context) {
      return new Column(children: &lt;Widget&gt;[
       new Center(
            child: new Row(
          children: &lt;Widget&gt;[
            new Text(
                'The button was pressed ' + _timesPressed.toString() + "         
   times"),
            new RaisedButton(
              onPressed: _buttonWasPressed(),
             child: new Row(
                children: &lt;Widget&gt;[new Text("Press meh")],
              ),
            ),
          ],
        ))
      ]);
    }
  }
  </code></pre>