BarTouchedSpot constructor

BarTouchedSpot(
  1. BarChartGroupData touchedBarGroup,
  2. int touchedBarGroupIndex,
  3. BarChartRodData touchedRodData,
  4. int touchedRodDataIndex,
  5. BarChartRodStackItem? touchedStackItem,
  6. int touchedStackItemIndex,
  7. FlSpot spot,
  8. Offset offset,
)

When touch happens, a BarTouchedSpot returns as a output, it tells you where the touch happened. touchedBarGroup, and touchedBarGroupIndex tell you in which group touch happened, touchedRodData, and touchedRodDataIndex tell you in which rod touch happened, touchedStackItem, and touchedStackItemIndex tell you in which rod stack touch happened (touchedStackItemIndex means nothing found). You can also have the touched x and y in the chart as a FlSpot using spot value, and you can have the local touch coordinates on the screen as a Offset using offset value.

Implementation

BarTouchedSpot(
  this.touchedBarGroup,
  this.touchedBarGroupIndex,
  this.touchedRodData,
  this.touchedRodDataIndex,
  this.touchedStackItem,
  this.touchedStackItemIndex,
  FlSpot spot,
  Offset offset,
) : super(spot, offset);