containsPoint method
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;
}