title: Renaming "key" in map using `Dart`
body: <p>My intention is to format the name <code>key</code> in an existing Map value.
  Supposed the current <code>key</code> value is in <code>UpperCase</code> but I wanted to make it <code>LowerCase</code></p>
  <p>From this</p>
  <pre class="lang-dart prettyprint-override"><code>Map&lt;String, String&gt; foo = {
         &quot;A&quot; : &quot;valueOne&quot;, 
         &quot;B&quot; : &quot;valueTwo&quot;,
  };
  
  print(foo); // output: {&quot;A&quot; : &quot;valueOne&quot;, &quot;B&quot; : &quot;valueTwo&quot;}
  </code></pre>
  <p>To this</p>
  <pre class="lang-dart prettyprint-override"><code>print(foo); // output: {&quot;a&quot; : &quot;valueOne&quot;, &quot;b&quot; : &quot;valueTwo&quot;}
  </code></pre>
  <p>Here's the method I tried:</p>
  <pre class="lang-dart prettyprint-override"><code>Map&lt;String, String&gt; foo = {
         &quot;A&quot; : &quot;valueOne&quot;, 
         &quot;B&quot; : &quot;valueTwo&quot;,
  };
  
  foo.forEach((key, value) {
      key = key.toString().toLowerCase();
      value = value;
  });
  
  ... something something
  </code></pre>
  <p>also tried to assign the <code>forEach</code> as a value</p>
  <pre class="lang-dart prettyprint-override"><code>Map&lt;String, String&gt; foo = {
         &quot;A&quot; : &quot;valueOne&quot;, 
         &quot;B&quot; : &quot;valueTwo&quot;,
  };
  
  var bar = foo.forEach((key, value) {
      key = key.toString().toLowerCase();
      value = value;
  });
  
  print(bar); // Failed because forEach Datatype is `void`
  
  ... something something
  </code></pre>
  <p>also tried</p>
  <pre class="lang-dart prettyprint-override"><code>Map&lt;String, String&gt; foo = {
         &quot;A&quot; : &quot;valueOne&quot;, 
         &quot;B&quot; : &quot;valueTwo&quot;,
  };
  
  foo.forEach((key, value) {
      key = key.toString().toLowerCase();
      value = value;
  
      Map&lt;String, String&gt; bar = {key: value};
  
      print(bar); // `Output: {a: valueOne} {b: valueTwo}` &lt;- is not what I was looking for.
  });
  
  ... something something
  </code></pre>
  <p>Any suggestions on what to do Next?</p>