MouseRegion constructor

const MouseRegion({
  1. Key? key,
  2. PointerEnterEventListener? onEnter,
  3. PointerExitEventListener? onExit,
  4. PointerHoverEventListener? onHover,
  5. MouseCursor cursor = MouseCursor.defer,
  6. bool opaque = true,
  7. HitTestBehavior? hitTestBehavior,
  8. Widget? child,
})

Creates a widget that forwards mouse events to callbacks.

By default, all callbacks are empty, cursor is MouseCursor.defer, and opaque is true.

Implementation

const MouseRegion({
  super.key,
  this.onEnter,
  this.onExit,
  this.onHover,
  this.cursor = MouseCursor.defer,
  this.opaque = true,
  this.hitTestBehavior,
  super.child,
});