title: Dart - Get total amount in a list
body: <p>Given this list </p>
  
  <pre><code>[
      {
          "id": "1",
          "name": "Bread",
          "sellingPrice": 10
  
      },
      {
          "id": "2",
          "name": "Drink",
          "sellingPrice": 30,
  
      }
  ]
  </code></pre>
  
  <p>and class </p>
  
  <pre><code>class Food {
    String id;
    String name;
    double sellingPrice;
  }
  </code></pre>
  
  <p>What i want here is to get the total amount . Just like below code but in dart. </p>
  
  <pre><code>foodlist.sum(c=&gt;c.sellingprice)
  </code></pre>