ChartPointerEvent class

A data class representing a pointer event with chart coordinates.

This class extends Flutter's pointer event information with chart-specific coordinate data for easier integration with data visualization components.

Constructors

ChartPointerEvent({required Offset localPosition, required Offset chartPosition, required Offset globalPosition, int buttons = 0, double pressure = 1.0, Offset delta = Offset.zero, Offset scrollDelta = Offset.zero, Duration timestamp = Duration.zero, PointerDeviceKind kind = PointerDeviceKind.mouse})
Creates a ChartPointerEvent.
const
ChartPointerEvent.fromPointerEvent(PointerEvent event, {Offset transformPosition(Offset)?})
Creates a ChartPointerEvent from a Flutter PointerEvent.
factory

Properties

buttons → int
Bit field using the constants such as kPrimaryMouseButton, kSecondaryMouseButton, etc.
final
chartPosition → Offset
The position of the pointer in chart data coordinates. This is the position after any coordinate transformation.
final
delta → Offset
The distance the pointer has moved since the last event.
final
globalPosition → Offset
The position of the pointer in the global coordinate space.
final
hashCode → int
The hash code for this object.
no setteroverride
isMouse → bool
Whether this is a mouse event.
no setter
isPrimaryButtonPressed → bool
Whether the primary button (usually left mouse button) is pressed.
no setter
isSecondaryButtonPressed → bool
Whether the secondary button (usually right mouse button) is pressed.
no setter
isStylus → bool
Whether this is a stylus event.
no setter
isTertiaryButtonPressed → bool
Whether the tertiary button (usually middle mouse button) is pressed.
no setter
isTouch → bool
Whether this is a touch event.
no setter
kind → PointerDeviceKind
The kind of pointer device.
final
localPosition → Offset
The position of the pointer in the widget's local coordinate space.
final
localX → double
The x coordinate in local widget space.
no setter
localY → double
The y coordinate in local widget space.
no setter
pressure → double
The pressure of the pointer (0.0 to 1.0).
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
scrollDelta → Offset
The scroll delta for scroll events.
final
timestamp → Duration
The timestamp of the event.
final
x → double
The x coordinate in chart data space.
no setter
y → double
The y coordinate in chart data space.
no setter

Methods

copyWith({Offset? localPosition, Offset? chartPosition, Offset? globalPosition, int? buttons, double? pressure, Offset? delta, Offset? scrollDelta, Duration? timestamp, PointerDeviceKind? kind}) → ChartPointerEvent
Creates a copy with updated values.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
override

Operators

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