title: How to copy List<T> in dart without old reference?
body: <p>Code will explain all:</p>
  <pre><code>//modal for list
  class MyModal
  {
   int myField1;
   List&lt;MyModal&gt; adjacentNodes;
   MyModal(this.myField1)
   {
    adjacentNodes= new List&lt;MyModal&gt;();
   }
  }
  
  //pre code
  List&lt;MyModal&gt; originalList = new List&lt;MyModal&gt;();
  originalList.add(new MyModal(1,&quot;firstBuddy&quot;));
  
  //copying list
  List&lt;MyModal&gt; secondList = new List&lt;MyModal&gt;();
  secondList.addAll(originalList);
  
  //Modifing copy list
  secondList.adjacentNodes.add(new MyModal(2,&quot;anotherBuddy&quot;));
  
  //Also modifies original list
  print(originalList[0].childs.length); //prints 1, it should prints 0
  </code></pre>
  <p>How can I perform changes in the second list without affecting the original list?</p>