containsPoint method

  1. @override
bool containsPoint(
  1. Vector2 point
)
override

Returns true if the given point is inside the shape or on the boundary.

Implementation

@override
bool containsPoint(Vector2 point) {
  return point.x >= _left &&
      point.y >= _top &&
      point.x <= _right &&
      point.y <= _bottom;
}