MouseTrackerAnnotation class

The annotation object used to annotate regions that are interested in mouse movements.

To use an annotation, push it with AnnotatedRegionLayer during painting. The annotation's callbacks or configurations will be used depending on the relationship between annotations and mouse pointers.

A RenderObject who uses this class must not dispose this class in its detach, even if it recreates a new one in attach, because the object might be detached and attached during the same frame during a reparent, and replacing the MouseTrackerAnnotation will cause an unnecessary onExit and onEnter.

This class is also the type parameter of the annotation search started by BaseMouseTracker.

See also:

Mixed in types
Implementers

Constructors

MouseTrackerAnnotation({PointerEnterEventListener onEnter, PointerHoverEventListener onHover, PointerExitEventListener onExit, MouseCursor cursor: MouseCursor.defer})
Creates an immutable MouseTrackerAnnotation. [...]
const

Properties

cursor MouseCursor
The mouse cursor for mouse pointers that are hovering over the region. [...]
final
hashCode int
The hash code for this object. [...]
read-only, inherited
onEnter PointerEnterEventListener
Triggered when a mouse pointer, with or without buttons pressed, has entered the region. [...]
final
onExit PointerExitEventListener
Triggered when a mouse pointer, with or without buttons pressed, has exited the region. [...]
final
onHover PointerHoverEventListener
Triggered when a mouse pointer has moved onto or within the region without buttons pressed. [...]
final
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited

Methods

debugFillProperties(DiagnosticPropertiesBuilder properties) → void
Add additional properties associated with the node. [...]
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
toDiagnosticsNode({String name, DiagnosticsTreeStyle style}) DiagnosticsNode
Returns a debug representation of the object that is used by debugging tools and by DiagnosticsNode.toStringDeep. [...]
inherited
toString({DiagnosticLevel minLevel: DiagnosticLevel.info}) String
Returns a string representation of this object.
inherited
toStringShort() String
A brief description of this object, usually just the runtimeType and the hashCode. [...]
inherited

Operators

operator ==(Object other) bool
The equality operator. [...]
inherited