onEnter property

void Function(PointerEnterEvent event) onEnter
final

Triggered when a mouse pointer has entered this widget.

This callback is triggered when the pointer, with or without buttons pressed, has started to be contained by the region of this widget. More specifically, the callback is triggered by the following cases:

  • This widget has appeared under a pointer.
  • This widget has moved to under a pointer.
  • A new pointer has been added to somewhere within this widget.
  • An existing pointer has moved into this widget.

This callback is not always matched by an onExit. If the MouseRegion is unmounted while being hovered by a pointer, the onExit of the widget callback will never called. For more details, see onExit.

The time that this callback is triggered is always between frames: either during the post-frame callbacks, or during the callback of a pointer event.

See also:

Implementation

final PointerEnterEventListener onEnter