title: Dart: Sum values in list based on condition: Calculate List value based on ID?
body: <p>I have list, I want to get total number of quantities available</p>
  <pre><code>var itemlist=[{&quot;item_name&quot;:&quot;32inch Tv&quot;,&quot;barnd&quot;:&quot;samsung&quot;,&quot;qty&quot;:12},
                {&quot;item_name&quot;:&quot;32inch Tv&quot;,&quot;barnd&quot;:&quot;realme&quot;,&quot;qty&quot;:10},
                {&quot;item_name&quot;:&quot;55inch Tv&quot;,&quot;barnd&quot;:&quot;samsung&quot;,&quot;qty&quot;:10},
                {&quot;item_name&quot;:&quot;55inch Tv&quot;,&quot;barnd&quot;:&quot;mi&quot;,&quot;qty&quot;:36},
                {&quot;item_name&quot;:&quot;40inch Tv&quot;,&quot;barnd&quot;:&quot;sony&quot;,&quot;qty&quot;:20},
                {&quot;item_name&quot;:&quot;40inch Tv&quot;,&quot;barnd&quot;:&quot;vu&quot;,&quot;qty&quot;:12}];
  </code></pre>
  <p>in dart how to get sum of &quot;qty&quot; based on &quot;item_name&quot;?</p>
  <p>like</p>
  <pre><code>32inch Tv =22
  55inch Tv =46
  40inch Tv =32
  </code></pre>
  <p>how to get this result???</p>
  <p>as</p>
  <pre><code> List&lt;int&gt; qty=[22,46,32];
  </code></pre>