title: Flutter stateful widget with child not updating state
body: <p>I'm working on a part of an app that will essentially just be keeping track of physical tokens that are like forms of currency. I'm trying to build a reusable Widget that will take in the state of that token quantity as a parameter, and increment/decrement that based on user interaction. For the sake of clarity, I've just included the decrement part of the Widget. My question: is the state of the token  that is getting passed into the widget not updating because it's just a reference to that state? Or am I missing something else. </p>
  
  <pre><code>    class RedeemTokensState extends State&lt;RedeemTokens&gt; {
        int oneQuantity = 0;
        int fiveQuantity = 0;
        int tenQuantity = 0;
        int total = 0;
  
      Widget _counterWidget(int tokenQuantity) {
          return Row(
            children: &lt;Widget&gt;[
              Expanded(
                child: IconButton(
                  icon: Icon(Icons.remove),
                  onPressed: () {
                    setState(() {
                      tokenQuantity = tokenQuantity - 1;
                      print(tokenQuantity);
                    });
                  },
                ),
              ),
      ),
      }
  
       Widget _buildOneField() {
      return ListTile(
        title: Text('\$1 Token'),
        trailing: Container(width: 200.0, child: _counterWidget(oneQuantity)),
      );
    }
  
    Widget _buildFiveField() {
      return ListTile(
        title: Text('\$5 Token'),
        trailing: Container(width: 200.0, child: _counterWidget(fiveQuantity)),
      );
    }
  
    Widget _buildTenField() {
      return ListTile(
        title: Text('\$10 Token'),
        trailing: Container(width: 200.0, child: _counterWidget(tenQuantity)),
      );
    }
  
      } 
  
  
      // main scaffold with build method
       ... Card(
                child: Container(
                  padding: EdgeInsets.all(10.0),
                  child: Column(
                    children: &lt;Widget&gt;[
                      _buildOneField(),
                      Divider(),
                      _buildFiveField(),
                      Divider(),
                      _buildTenField(),
                      Divider(),
                      _buildFreshConnectField(),
                    ],
                  ),
                ),
              ), 
  </code></pre>