opaque property

bool get opaque

Whether this object should prevent RenderMouseRegions visually behind it from detecting the pointer, thus affecting how their onHover, onEnter, and onExit behave.

If opaque is true, this object will absorb the mouse pointer and prevent this object's siblings (or any other objects that are not ancestors or descendants of this object) from detecting the mouse pointer even when the pointer is within their areas.

If opaque is false, this object will not affect how RenderMouseRegions behind it behave, which will detect the mouse pointer as long as the pointer is within their areas.

This defaults to true.

Implementation

bool get opaque => _opaque;
set opaque (bool value)

Implementation

set opaque(bool value) {
  if (_opaque != value) {
    _opaque = value;
    // Trigger [MouseTracker]'s device update to recalculate mouse states.
    markNeedsPaint();
  }
}