title: Tried to listen to a value exposed with provider, from outside of the widget tree in this simple provider error in this provider example
body: <p>So i'm kinda playing around with the provider package and everything to get an idea of how to use it , My code is :</p>
  <pre><code>import 'package:flutter/material.dart';
  import 'package:provider/provider.dart';
  
  void main() {
    runApp(MyApp());
  }
  
  class MyApp extends StatelessWidget {
    @override
    Widget build(BuildContext context) {
      return ChangeNotifierProvider&lt;Data&gt;(
        create: (context) {
          return Data();
        },
        child: MaterialApp(
          title: 'Flutter Demo',
          theme: ThemeData(
            primarySwatch: Colors.blue,
          ),
          home: Scaffold(
            appBar: AppBar(
              title: MyText(),
            ),
            body: Level1(),
          ),
        ),
      );
    }
  }
  
  class Level1 extends StatelessWidget {
    @override
    Widget build(BuildContext context) {
      return Container(
        child: Level2(),
      );
    }
  }
  
  class Level2 extends StatelessWidget {
    @override
    Widget build(BuildContext context) {
      return Column(children: [
        MyTextField(),
        Level3(),
      ]);
    }
  }
  
  class Level3 extends StatelessWidget {
    @override
    Widget build(BuildContext context) {
      return Text(Provider.of&lt;Data&gt;(context).data);
    }
  }
  
  class MyText extends StatelessWidget {
    @override
    Widget build(BuildContext context) {
      return Text(Provider.of&lt;Data&gt;(context).data);
    }
  }
  
  class MyTextField extends StatelessWidget {
    @override
    Widget build(BuildContext context) {
      return TextField(
        onChanged: (newString) {
          Provider.of&lt;Data&gt;(context).changeString(newString);
        },
      );
    }
  }
  
  class Data extends ChangeNotifier {
    String data = 'starting value';
  
    void changeString(String newString) {
      data = newString;
      notifyListeners();
    }
  }
  </code></pre>
  <p>as far as i understand , i created the provider with type data , classes Level 3 and MyTextField and MyText all use it , My TextField basically just changes the value of the other 2 classes ( MyText and MyTextField) to whatever input it gets</p>
  <p>the full error i'm getting is :</p>
  <pre><code>════════ Exception caught by widgets ═══════════════════════════════════════════
  The following assertion was thrown while calling onChanged:
  Tried to listen to a value exposed with provider, from outside of the widget tree.
  
  This is likely caused by an event handler (like a button's onPressed) that called
  Provider.of without passing `listen: false`.
  
  To fix, write:
  Provider.of&lt;Data&gt;(context, listen: false);
  
  It is unsupported because may pointlessly rebuild the widget associated to the
  event handler, when the widget tree doesn't care about the value.
  
  The context used was: MyTextField
  'package:provider/src/provider.dart':
  Failed assertion: line 265 pos 7: 'context.owner!.debugBuilding ||
            listen == false ||
            debugIsInInheritedProviderUpdate'
  </code></pre>
  <p>but it's not getting me anywhere</p>