W3cubDocs

/Dart 2

operator == method

bool operator == (dynamic other)

A Point is only equal to another Point with the same coordinates.

This point is equal to other if, and only if, other is a Point with x equal to other.x and y equal to other.y.

Implementation

bool operator ==(other) {
  if (other is! Point) return false;
  return x == other.x && y == other.y;
}

© 2012 the Dart project authors
Licensed under the Creative Commons Attribution-ShareAlike License v4.0.
https://api.dartlang.org/stable/2.0.0/dart-math/Point/operator_equals.html