Flutter :[cloud_firestore/unknown] NoSuchMethodError: invalid member on null: 'includeMetadataChanges' (Flutter Web)

I found the answer, it caused because of the version of Firebase JS SDK . I replace 8.1.1 to 7.22.1 in index.html file

  <!-- The core Firebase JS SDK is always required and must be listed first -->
  <!--  <script src="https://www.gstatic.com/firebasejs/8.1.1/firebase-app.js"></script>-->

<!--  &lt;!&ndash; TODO: Add SDKs for Firebase products that you want to use-->
<!--       https://firebase.google.com/docs/web/setup#available-libraries &ndash;&gt;- ->
<!--  <script src="https://www.gstatic.com/firebasejs/8.1.1/firebase-firestore.js"> 
</script>-->
 <!--  <script src="https://www.gstatic.com/firebasejs/8.1.1/firebase-analytics.js"></script>-->

I am using 7.22.1 version for Firebase JS SDK

<script src="https://www.gstatic.com/firebasejs/7.22.1/firebase-app.js"></script>

<!-- TODO: Add SDKs for Firebase products that you want to use
   https://firebase.google.com/docs/web/setup#available-libraries -->
<script src="https://www.gstatic.com/firebasejs/7.22.1/firebase-firestore.js"></script>
<script src="https://www.gstatic.com/firebasejs/7.22.1/firebase-analytics.js"></script>