title: error: The operator '[]' isn't defined for the type 'Object'. of flutter
body: <p>I'm going to update the data related to Comant in the post documentary, and if there are too many Comant, I'm going to implement writing down how many Comant there are, but there is an error.</p>
  <pre class="lang-flutter prettyprint-override"><code>int numOfComments = postSnapshot.data[KEY_NUMOFCOMMENTS];
           tx.update(postRef, {
             KEY_NUMOFCOMMENTS: numOfComments+1,
             KEY_LASTCOMMENT: commentData[KEY_LASTCOMMENT],
             KEY_LASTCOMMENTTIME: commentData[KEY_COMMENTTIME],
             KEY_LASTCOMMENTOR: commentData[KEY_USERKEY],
  </code></pre>
  <p>I wrote it like this, but there's an error. I looked it up, and I was told to write () next to the data, but there's an error.</p>
  <p>There's an error like this.
  error: The operator '[]' isn't defined for the type 'Object'. (undefined_operator at [instagram] lib/repo/comment_network_repository.dart:21)<a href="https://i.stack.imgur.com/zz13R.png" rel="nofollow noreferrer">enter image description here</a></p>
  <p>Is there a problem with KEY_NUMOFCOMENTS?
  <div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>const KEY_NUMOFCOMMENTS='num_of_last_comments';</code></pre>
  </div>
  </div>
  </p>