PieTouchData constructor

PieTouchData({
  1. bool? enabled,
  2. BaseTouchCallback<PieTouchResponse>? touchCallback,
  3. MouseCursorResolver<PieTouchResponse>? mouseCursorResolver,
  4. Duration? longPressDuration,
})

You can disable or enable the touch system using enabled flag,

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 PieTouchResponse which contains information about the elements that has touched.

Using mouseCursorResolver you can change the mouse cursor based on the provided FlTouchEvent and PieTouchResponse

Implementation

PieTouchData({
  bool? enabled,
  BaseTouchCallback<PieTouchResponse>? touchCallback,
  MouseCursorResolver<PieTouchResponse>? mouseCursorResolver,
  Duration? longPressDuration,
}) : super(
        enabled ?? true,
        touchCallback,
        mouseCursorResolver,
        longPressDuration,
      );