title: (Firebase's Firestore || Flutter) How to get total of an identical field in all maps in a document
body: <p>I have identical fields in <code>maps</code> in a <code>document</code>. I want to get a <code>sum</code> total of all <code>map</code> fields.</p>
  
  <p>Here a sample of the structure:</p>
  
  <pre><code>1: {
  Name: "banana",
  Price: 50,
  Weight: 70
  }
  
  2: {
  Name: "apple",
  Price: 80,
  Weight: 30
  }
  ...
  </code></pre>
  
  <p>I'll have multiple <code>maps</code> like these in a <code>document</code>. </p>
  
  <p>Now, how to get <code>sum</code> total of all <code>fruits</code>' <code>price</code> or <code>weight</code>?</p>
  
  <p>i.e.</p>
  
  <p><strong>Total Price</strong>: 50 + 80 = 130</p>
  
  <p><strong>Total Quantity</strong>: 70 + 30 = 100</p>
  
  <p>Is it possible to do so without mentioning the name of the <code>map</code>? Since i'll have multiple <code>maps</code> in a <code>ducument</code>. If not, what's an alternative structure?</p>
  
  <p>Here is my structure for now:</p>
  
  <pre><code>          Stores (collections)
                      |
           Products (sub collection)
            |                    |
  Fruits (Document)      Vegetables (Document)
         |
  Maps with tittle fruit id
       |_ Name
       |_ Price
       |_ Weight
  </code></pre>
  
  <p>Note: My database is about something else, not exactly this. So dont try to make sense of the query.</p>