Annotation class

An annotation which can be attached to a Graph.

The annotation can be moved around on the graph by dragging the mouse while pressing the left mouse button. The annotation can hold a Widget of any kind specified by child

Constructors

Annotation({required double width, required double height, Offset position = Offset.infinite, dynamic onDragStart(DraggablePlotObject obj)?, dynamic onDragEnd(DraggablePlotObject obj)?, Widget? child})

Properties

child Widget
no setter
halfHeight double
The half of the height, for isHit calculation purposes
finalinherited
halfWidth double
The half of the width, for isHit calculation purposes
finalinherited
hashCode int
The hash code for this object.
no setteroverride
height double
The hit box height of the object in pixels.
finalinherited
onDragEnd ↔ dynamic Function(DraggablePlotObject obj)?
Function called every time the PlotObject has been moved
getter/setter pairinherited
onDragStart ↔ dynamic Function(DraggablePlotObject obj)?
Function called every time the PlotObject is hit.
getter/setter pairinherited
position Offset
The local position within the plot of the object.
getter/setter pairinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
width double
The hit box width of the object in pixels.
finalinherited

Methods

isHit(PointerDownEvent event, Matrix4 transform) bool
Logic for deciding if the object is hit or not.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
onDrag(PointerMoveEvent event, Matrix4 eventTransform) → void
Function called on PointerMoveEvent if this object is hit.
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
override