MouseRegion constructor Null safety
- {Key? key,
- PointerEnterEventListener? onEnter,
- PointerExitEventListener? onExit,
- PointerHoverEventListener? onHover,
- MouseCursor cursor = MouseCursor.defer,
- bool opaque = true,
- HitTestBehavior? hitTestBehavior,
- 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. The cursor must not be null.
Implementation
const MouseRegion({
super.key,
this.onEnter,
this.onExit,
this.onHover,
this.cursor = MouseCursor.defer,
this.opaque = true,
this.hitTestBehavior,
super.child,
}) : assert(cursor != null),
assert(opaque != null);