containsEventHandlerAt method

bool containsEventHandlerAt(
  1. Vector2 position
)

Whether the game should consume pointer events at the given position, rather than letting them through to the Flutter widgets behind it.

Only consulted when the GameWidget is built with HitTestBehavior.deferToChild; the other behaviors decide without asking the game.

The default returns true, so the game is opaque across its whole surface. To be transparent wherever no component handles input, add the DeferHitTestToComponents mixin, or override this with your own rule.

Implementation

bool containsEventHandlerAt(Vector2 position) => true;