containsLocalPoint method

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

Checks whether the point is within this component's bounds.

This method should be implemented for any component that has a visual representation and non-zero size. The point is in the local coordinate space.

Implementation

@override
bool containsLocalPoint(Vector2 point) {
  _transform.localToGlobal(point, output: _hitTestPoint);
  return body.fixtures.any((fixture) => fixture.testPoint(_hitTestPoint));
}