handlePointerUp method

void handlePointerUp(
  1. PointerUpEvent details
)

Implementation

void handlePointerUp(PointerUpEvent details) {
  final Offset localPosition = globalToLocal(details.position);
  if (onPointTap != null &&
      _interactiveSegment != null &&
      _canInvokePointerUp) {
    final int pointIndex =
        dataPointIndex(localPosition, _interactiveSegment!);
    final int segPointIndex =
        segmentPointIndex(localPosition, _interactiveSegment!);
    final ChartPointDetails pointDetails = ChartPointDetails(
      index,
      viewportIndex(segPointIndex),
      chartPoints,
      pointIndex,
    );
    onPointTap!(pointDetails);
  }
  _canInvokePointerUp = true;
}