title: Understand how listen: false works when used with Provider<SomeType>.of(context, listen: false)
body: <p>I'm working through understanding how the Provider package works with Flutter but confused on how listen:false works. </p>
  
  <p>I wrote some basic code using the usual Counter example from a new Flutter project. I created three types of stateless widgets each using a Provider:</p>
  
  <ol>
  <li>Provider.of(context)</li>
  <li>Consumer</li>
  <li>Provider.of(context, listen: false)</li>
  </ol>
  
  <p>The third example was to show how access the provider object and call methods on it without it rebuilding. </p>
  
  <p>When I run the application all of the widget counts are changing - and I only expect it to change in the first two. </p>
  
  <p>This is a simple example - what am I doing wrong?</p>
  
  <pre class="lang-dart prettyprint-override"><code>import 'package:flutter/material.dart';
  import 'package:provider/provider.dart';
  
  void main() =&gt; runApp(MyApp());
  
  class Counter with ChangeNotifier {
    int _count = 0;
    int get count =&gt; _count;
  
    void increment() {
      _count++;
      notifyListeners();
    }
  }
  
  class MyApp extends StatelessWidget {
    // This widget is the root of your application.
    @override
    Widget build(BuildContext context) {
      return MultiProvider(
        providers: [
          ChangeNotifierProvider(builder: (_) =&gt; Counter()),
        ],
        child: MaterialApp(
          title: 'Provider Demo',
          theme: ThemeData(
            primarySwatch: Colors.amber,
          ),
          home: MyHomePage(title: 'Provider Demo Home Page'),
        ),
      );
    }
  }
  
  class MyHomePage extends StatelessWidget {
    MyHomePage({Key key, this.title}) : super(key: key);
  
    final String title;
  
    @override
    Widget build(BuildContext context) {
      Counter counter = Provider.of&lt;Counter&gt;(context);
      return Scaffold(
        appBar: AppBar(
          title: Text(title),
        ),
        body: Center(
          child: Column(
            mainAxisAlignment: MainAxisAlignment.center,
            children: &lt;Widget&gt;[
              ExampleProviderWidget(),
              ExampleConsumerWidget(),
              ExampleNoListenWidget()
            ],
          ),
        ),
        floatingActionButton: FloatingActionButton(
          onPressed: () =&gt; counter.increment(),
          tooltip: 'Increment',
          child: Icon(Icons.add),
        ),
      );
    }
  }
  
  class ExampleProviderWidget extends StatelessWidget {
    @override
    Widget build(BuildContext context) {
      Counter counter = Provider.of&lt;Counter&gt;(context);
  
      return Container(
        color: Colors.green,
        child: Center(
          child: Column(
            mainAxisAlignment: MainAxisAlignment.center,
            children: &lt;Widget&gt;[
              Text(
                'Provider.of&lt;Counter&gt;(context):',
              ),
              Text(
                '${counter.count}',
                style: Theme.of(context).textTheme.display1,
              ),
            ],
          ),
        ),
      );
    }
  }
  
  class ExampleConsumerWidget extends StatelessWidget {
    @override
    Widget build(BuildContext context) {
      return Consumer&lt;Counter&gt;(
        builder: (context, counter, _) {
          return Container(
            color: Colors.blue,
            child: Center(
              child: Column(
                mainAxisAlignment: MainAxisAlignment.center,
                children: &lt;Widget&gt;[
                  Text(
                    'Consumer&lt;Counter&gt;(context):',
                  ),
                  Text(
                    '${counter.count}',
                    style: Theme.of(context).textTheme.display1,
                  ),
                ],
              ),
            ),
          );
        },
      );
    }
  }
  
  class ExampleNoListenWidget extends StatelessWidget {
    @override
    Widget build(BuildContext context) {
      Counter counter = Provider.of&lt;Counter&gt;(context, listen: false);
  
      return Container(
        color: Colors.red,
        child: Center(
          child: Column(
            mainAxisAlignment: MainAxisAlignment.center,
            children: &lt;Widget&gt;[
              Text(
                'Provider.of&lt;Counter&gt;(context, listen: false):',
              ),
              Text(
                '${counter.count}',
                style: Theme.of(context).textTheme.display1,
              ),
              RaisedButton(
                child: Text("Increment"),
                onPressed: () =&gt; counter.increment(),
              )
            ],
          ),
        ),
      );
    }
  }
  
  </code></pre>