intersects method Null safety

bool intersects (
  1. Rectangle<num> other
)
inherited

Returns true if this intersects other.

Implementation

bool intersects(Rectangle<num> other) {
  return (left <= other.left + other.width &&
      other.left <= left + width &&
      top <= other.top + other.height &&
      other.top <= top + height);
}