RadarTouchData constructor

RadarTouchData({
  1. bool? enabled,
  2. BaseTouchCallback<RadarTouchResponse>? touchCallback,
  3. MouseCursorResolver<RadarTouchResponse>? mouseCursorResolver,
  4. Duration? longPressDuration,
  5. double? touchSpotThreshold,
})

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

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

Implementation

RadarTouchData({
  bool? enabled,
  BaseTouchCallback<RadarTouchResponse>? touchCallback,
  MouseCursorResolver<RadarTouchResponse>? mouseCursorResolver,
  Duration? longPressDuration,
  double? touchSpotThreshold,
})  : touchSpotThreshold = touchSpotThreshold ?? 10,
      super(
        enabled ?? true,
        touchCallback,
        mouseCursorResolver,
        longPressDuration,
      );