onInteraction method

void onInteraction(
  1. PieInteractionResult interactionResult
)
inherited

Implementation

void onInteraction(T interactionResult) {
  onRawInteraction?.call(interactionResult);
  switch (interactionResult.interactionType) {
    case TouchInteractionType.doubleTap:
      onDoubleTap?.call(interactionResult);
      break;
    case TouchInteractionType.dragUpdate:
      onDrag?.call(interactionResult);
      break;
    case TouchInteractionType.dragStart:
      onDragStart?.call(interactionResult);
      break;
    case TouchInteractionType.dragEnd:
      onDragEnd?.call(interactionResult);
      break;
    case TouchInteractionType.tapUp:
      onTap?.call(interactionResult);
      break;
    case TouchInteractionType.tapDown:
      onTapDown?.call(interactionResult);
      break;
    case TouchInteractionType.tap:
      onTap?.call(interactionResult);
      break;
  }
}