ScatterTouchData class

Holds data to handle touch events, and touch responses in the ScatterChart.

There is a touch flow, explained here in a simple way, each chart's renderer captures the touch events, and passes the pointerEvent to the painter, and gets touched spot, and wraps it into a concrete ScatterTouchResponse.

Inheritance

Constructors

ScatterTouchData({bool? enabled, BaseTouchCallback<ScatterTouchResponse>? touchCallback, MouseCursorResolver<ScatterTouchResponse>? mouseCursorResolver, Duration? longPressDuration, ScatterTouchTooltipData? touchTooltipData, double? touchSpotThreshold, bool? handleBuiltInTouches})
You can disable or enable the touch system using enabled flag,

Properties

enabled bool
You can disable or enable the touch system using enabled flag,
finalinherited
handleBuiltInTouches bool
set this true if you want the built in touch handling (show a tooltip bubble and an indicator on touched spots)
final
hashCode int
The hash code for this object.
no setterinherited
longPressDuration Duration?
This property that allows to customize the duration of the longPress gesture. default to 500 milliseconds refer to kLongPressTimeout.
finalinherited
mouseCursorResolver MouseCursorResolver<ScatterTouchResponse>?
Using mouseCursorResolver you can change the mouse cursor based on the provided FlTouchEvent and BaseTouchResponse
finalinherited
props List<Object?>
Used for equality check, see EquatableMixin.
no setteroverride
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
stringify bool?
If set to true, the toString method will be overridden to output this instance's props.
no setterinherited
touchCallback BaseTouchCallback<ScatterTouchResponse>?
touchCallback notifies you about the happened touch/pointer events. It gives you a FlTouchEvent which is the happened event such as FlPointerHoverEvent, FlTapUpEvent, ... It also gives you a BaseTouchResponse which is the chart specific type and contains information about the elements that has touched.
finalinherited
touchSpotThreshold double
we find the nearest spots on touched position based on this threshold
final
touchTooltipData ScatterTouchTooltipData
show a tooltip on touched spots
final

Methods

copyWith({bool? enabled, BaseTouchCallback<ScatterTouchResponse>? touchCallback, MouseCursorResolver<ScatterTouchResponse>? mouseCursorResolver, Duration? longPressDuration, ScatterTouchTooltipData? touchTooltipData, double? touchSpotThreshold, bool? handleBuiltInTouches}) ScatterTouchData
Copies current ScatterTouchData to a new ScatterTouchData, and replaces provided values.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

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