equals function

dynamic equals(
  1. dynamic p1,
  2. dynamic p2
)

Implementation

equals(p1, p2) {
  return p1.x == p2.x && p1.y == p2.y;
}