RenderMouseRegion constructor Null safety
- {PointerEnterEventListener? onEnter,
- PointerHoverEventListener? onHover,
- PointerExitEventListener? onExit,
- MouseCursor cursor = MouseCursor.defer,
- bool validForMouseTracker = true,
- bool opaque = true,
- RenderBox? child,
- HitTestBehavior? hitTestBehavior = HitTestBehavior.opaque}
Creates a render object that forwards pointer events to callbacks.
All parameters are optional. By default this method creates an opaque
mouse region with no callbacks and cursor being MouseCursor.defer. The
cursor
must not be null.
Implementation
RenderMouseRegion({
this.onEnter,
this.onHover,
this.onExit,
MouseCursor cursor = MouseCursor.defer,
bool validForMouseTracker = true,
bool opaque = true,
super.child,
HitTestBehavior? hitTestBehavior = HitTestBehavior.opaque,
}) : assert(opaque != null),
assert(cursor != null),
_cursor = cursor,
_validForMouseTracker = validForMouseTracker,
_opaque = opaque,
super(behavior: hitTestBehavior ?? HitTestBehavior.opaque);