title: How to clone (copy values) a complex object in Dart 2
body: <p>I would like to clone a complex object (copy values), not referencing, using Dart 2.</p>
  
  <p>Example:</p>
  
  <pre><code>class Person {
    String name;
    String surname;
    City city;
  }
  
  class City {
    String name;
    String state;
  }
  
  main List&lt;String&gt; args {
    City c1 = new City()..name = 'Blum'..state = 'SC';
    Person p1 = new Person()..name = 'John'..surname = 'Xuebl'..city = c1;
  
  
    Person p2 = // HERE, to clone/copy values... Something similar to p1.clone();
  }
  </code></pre>
  
  <p>What would be the way (best practice) to do this?</p>
  
  <p><strong>Update note:</strong> This <a href="https://stackoverflow.com/questions/13107906/how-can-i-clone-an-object-deep-copy-in-dart">How can I clone an Object (deep copy) in Dart?</a> was posted some time ago. The focus here is to understand if Dart 2 that is bringing many improvements, has a facility for copying complex objects.</p>