title: Making a new list from existing list in flutter; changes both list upon action on new list
body: <p>i am making a list in flutter from an existing list and when i used this new list and perform some action on it like change its quantity parameter it changes the parameter of existing list also. Can some one tell me where i am going wrong.</p>
  
  <p><strong>Existing list:</strong></p>
  
  <pre><code>  List&lt;ItemsModel&gt; originalList=[
      ItemsModel(name: 'High Quality Double Spring Tummy Trimmer For Unisex',quantity: '30'),
      ItemsModel(name: 'High Quality Double Spring Tummy Trimmer For Unisex',quantity: '30'),
      ItemsModel(name: 'High Quality Double Spring Tummy Trimmer For Unisex',quantity: '30'),
    ];
  </code></pre>
  
  <p><strong>New list:</strong></p>
  
  <pre><code>  List&lt;ItemsModel&gt; updatedItemList;
        void initState() {
          updatedItemList=[];
          originalList.forEach((val){
        updatedItemList.add(val);
      });
          super.initState();
        }
  </code></pre>
  
  <p><strong>on pressed button:</strong></p>
  
  <pre><code> updatedItemList[i].quantity=qtyReceive
  </code></pre>
  
  <p>And on some button pressed i am performing this action that was updating both lists. Why??</p>