Prototype Design Pattern, Prototype Design, Flutter, Flutter App Development, Dark Design Patterns.
p2 = Point(p1.x, p1.y); final p3 = Point() ..x = p1.x ..y = p1.y; Point class has two public arguments x and y Both are mutuable. With such a small, simple class, it's trivial to produce copies of p1 either with the class's constructor or by setting the properties on an uninitialized new object