Slide 29
Slide 29 text
library myApp.geom;
!
import "package:hash/hash.dart";
!
class Point {
num x;
num y;
!
Point(this.x, this.y);
!
Point operator +(Point other) {
return new Point(x + other.x, y + other.y);
}
String toString() => "{x: $x, y: $y}";
}
LANGUAGE TOUR
OPERATOR OVERLOADING
FA
M
IL
IA
R