BarTouchData class

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

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 BarTouchResponse.

Inheritance

Constructors

BarTouchData({bool? enabled, BaseTouchCallback<BarTouchResponse>? touchCallback, MouseCursorResolver<BarTouchResponse>? mouseCursorResolver, Duration? longPressDuration, BarTouchTooltipData? touchTooltipData, EdgeInsets? touchExtraThreshold, bool? allowTouchBarBackDraw, bool? handleBuiltInTouches})
You can disable or enable the touch system using enabled flag,

Properties

allowTouchBarBackDraw bool
Determines to handle touches on the back draw bar.
final
enabled bool
You can disable or enable the touch system using enabled flag,
finalinherited
handleBuiltInTouches bool
Determines to handle default built-in touch responses, BarTouchResponse shows a tooltip popup above the touched spot.
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<BarTouchResponse>?
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<BarTouchResponse>?
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
touchExtraThreshold EdgeInsets
Distance threshold to handle the touch event.
final
touchTooltipData BarTouchTooltipData
Configs of how touch tooltip popup.
final

Methods

copyWith({bool? enabled, BaseTouchCallback<BarTouchResponse>? touchCallback, MouseCursorResolver<BarTouchResponse>? mouseCursorResolver, Duration? longPressDuration, BarTouchTooltipData? touchTooltipData, EdgeInsets? touchExtraThreshold, bool? allowTouchBarBackDraw, bool? handleBuiltInTouches}) BarTouchData
Copies current BarTouchData to a new BarTouchData, 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