MouseRegion
Reports the pointer entering, moving within, and leaving its child.
Hover requires motion tracking (TerminalMode.mouseMotion); without
it, enter/exit still fire on clicks.
Learn more: Input & gestures
Import: package:fleury/fleury.dart, or package:fleury/fleury_core.dart in browser code.
MouseRegion( onEnter: () => setHover(true), onExit: () => setHover(false), child: Text('hover me'),)Constructors
Section titled “Constructors”MouseRegion()
Section titled “MouseRegion()”| Parameter | Type | Default | Description |
|---|---|---|---|
onEnter: | PointerTapCallback? | — | Called when the pointer enters the child’s painted bounds. |
onExit: | PointerTapCallback? | — | Called when the pointer leaves the child’s painted bounds. |
onHover: | PointerCallback? | — | Called on pointer motion with coordinates relative to this region and the surface. |
onScroll: | PointerScrollCallback? | — | Return true to consume the wheel step, false to offer it to an ancestor. |
cursor: | MouseCursor? | — | Overrides the host’s pointer shape inside this region. Null lets the host use its ordinary control cursor. Descendant controls can override it. |
child: | Widget | required | Subtree whose painted bounds define the hover region. |
Source
Section titled “Source”MouseRegion is defined in packages/fleury/lib/src/widgets/pointer.dart.
Category: Input handling & focus · All widgets