title: Flutter :[cloud_firestore/unknown] NoSuchMethodError: invalid member on null: 'includeMetadataChanges' (Flutter Web)
body: <p>I am trying to fetch data from Friebase-firestore and then convert it to model, I used the same code and approach to another project (web project) ,it works fine , but with this project it doesn't work ,I don't know why. I upgrade flutter version, run Flutter doctor , and nothing wrong with the environment setup.
  here is the code :</p>
  <pre><code>class dbService{
  
  static final CollectionReference myCollection = 
    FirebaseFirestore.instance.collection('myCollection');
  
  static Future&lt;myModel&gt; getMyInfo() async{
  myModel sanaa ;
  print('this line to print');
  final QuerySnapshot myInfo =await myCollection.limit(1).get();
  myInfo.docs.forEach((element) {
    print(element.data()['name']);
   sanaa= new myModel(
        name:element.data()['name'].toString(),
        title: element.data()[&quot;title&quot;].toString(),
        img: element.data()['img'].toString(),
       );
    print('\n print  ------ ');
    print(element.data()['name']);
    print('   that is');
  }
  
  );
  return sanaa;
  
  }
  }
  class dbManager{
   Stream&lt;myModel&gt; myInfoStream() async*{
   yield await dbService.getMyInfo();
   }
  }
     class _aboutStateState extends State&lt;aboutState&gt; { 
     Stream stream ;
     dbManager mng = new dbManager();
    @override
     void initState() {
     // TODO: implement initState
      stream = mng.myInfoStream();
      super.initState();
     }
      @override
    Widget build(BuildContext context) {
      return Container(
      color: Colors.pink[300],
      child: StreamBuilder&lt;myModel&gt;(
       stream: stream,
       builder: (context, snapshot){
         if(snapshot.hasError){
           print(snapshot.error);
          return Center(child: Text('Something went wrong , please try again later'),);
        }
        else if(snapshot.hasData){
    
          return  Text(&quot;${snapshot.data.name}&quot;);
        
        }
        else {
          return Center(child: CircularProgressIndicator());
        }
      },
    ),
  </code></pre>
  <p>I got this error</p>
  <pre><code>this line to print
  [cloud_firestore/unknown] NoSuchMethodError: invalid member on null: 'includeMetadataChanges'
  </code></pre>
  <p>but when I connect directly to the firestore without converting it into model ,It works fine and print the data in the screen , the code :</p>
  <pre><code>child:FutureBuilder(
     future: me.doc(id).get(),
      
      builder: (context, snapshot){
        if(snapshot.hasError){
          print(snapshot.error);
          return Center(child: Text('Something went wrong , please try again later'),);
        }
        else if(snapshot.hasData){
         // print(&quot;${snapshot.data.data()['app_pics'][1]}  \n${snapshot.data.data()['img']}&quot;);
          return  Text(&quot;${snapshot.data.data()['app_pics'][1]}&quot;);
          
        }
        else {
          return Center(child: CircularProgressIndicator());
        }
      },
    ),
  </code></pre>
  <p>I run flutter doctor</p>
  <pre><code>Doctor summary (to see all details, run flutter doctor -v):
  [√] Flutter (Channel beta, 1.24.0-10.2.pre, on Microsoft Windows [Version 6.3.9600], locale
    en-US)
  [√] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
  [√] Chrome - develop for the web
  [√] Android Studio (version 4.0)
  [√] VS Code (version 1.51.0)
  [√] Connected device (3 available)
  
  • No issues found!
  </code></pre>
  <p>Please I need help
  <a href="https://i.stack.imgur.com/EGGIf.png" rel="noreferrer"><img src="https://i.stack.imgur.com/EGGIf.png" alt="enter image description here" /></a></p>