title: How to add a new pair to Map in Dart?
body: <p>I caught the following errors when adding a new pair to a Map.</p>
  <ul>
  <li><code>Variables must be declared using the keywords const, final, var, or a type name</code></li>
  <li><code>Expected to find;</code></li>
  <li><code>the name someMap is already defined</code></li>
  </ul>
  <p>I executed the following code.</p>
  <pre><code>Map&lt;String, int&gt; someMap = {
    &quot;a&quot;: 1,
    &quot;b&quot;: 2,
  };
  
  someMap[&quot;c&quot;] = 3;
  </code></pre>
  <p>How should I add a new pair to the Map?</p>
  <p>I'd also like to know how to use <code>Map.update</code>.</p>