hitTest method

bool hitTest(
  1. PainterRef ref,
  2. Offset location
)

Whether this widget should absorb hit tests.

By default, it will not absorb any hit tests it receives if the position is DecorationPosition.foreground, and it will absorb all hit tests (that do not hit descendant widgets) if it's DecorationPosition.background.

Implementation

bool hitTest(PainterRef ref, Offset location) => position == DecorationPosition.background;