addTouch method

void addTouch(
  1. int pointer,
  2. TapDownDetails details
)

Implementation

void addTouch(int pointer, TapDownDetails details) {
  this.numberOfTouches++;
  if (this.numberOfTouches == 1 && this.onSingleTap != null) {
    firstPoint = details.localPosition;
    this.onSingleTap!(details.localPosition);
  }

  if (this.numberOfTouches == 2) {
    this.onMultiTap(firstPoint, details.localPosition);
  }
}