title: Flutter, The method 'containsKey' isn't defined for the type 'Object'
body: <pre><code>documentSnapshot.data().containsKey(&quot;fieldName&quot;)
  </code></pre>
  <p>I updated Flutter from 2.23 to 2.8</p>
  <p>and suddenly red line occurs</p>
  <p>and the error message is</p>
  <pre><code>The method 'containsKey' isn't defined for the type 'Object'.
  </code></pre>
  <p>There is a red line under containsKey How to solve this?</p>