Description
This issue was originally filed by [email protected]
What steps will reproduce the problem?
It seems to be unnecessary difficult to create a shallow copy of an object (please correct me if I am wrong). I couldn't find another way than to implement a method copy() in each subclass of a class hierarchy that would only call its own constructor to create a new object of the same type and with the same field values.
What is the expected output? What do you see instead?
I see that a copy() method in Object might not be desirable, but it would be very useful if Dart somehow had the possibility to create a new instance of an object with identical field values (shallow copy, clone).
What version of the product are you using? On what operating system?
Dart SDK version 7904