GestureDispatcher constructor

GestureDispatcher()

Implementation

GestureDispatcher() {
  // Tap Recognizer
  _gestureRecognizers[EVENT_CLICK] = TapGestureRecognizer()..onTapUp = _onClick;
  // DoubleTap Recognizer
  _gestureRecognizers[EVENT_DOUBLE_CLICK] = DoubleTapGestureRecognizer()..onDoubleTapDown = _onDoubleClick;
  // Swipe Recognizer
  _gestureRecognizers[EVENT_SWIPE] = SwipeGestureRecognizer()..onSwipe = _onSwipe;
  // Pan Recognizer
  _gestureRecognizers[EVENT_PAN] = PanGestureRecognizer()
    ..onStart = _onPanStart
    ..onUpdate = _onPanUpdate
    ..onEnd = _onPanEnd;
  // LongPress Recognizer
  _gestureRecognizers[EVENT_LONG_PRESS] = LongPressGestureRecognizer()..onLongPress = _onLongPress;
  // Scale Recognizer
  _gestureRecognizers[EVENT_SCALE] = ScaleGestureRecognizer()
    ..onStart = _onScaleStart
    ..onUpdate = _onScaleUpdate
    ..onEnd = _onScaleEnd;
  // Drag Recognizer
  _gestureRecognizers[EVENT_DRAG] = ImmediateMultiDragGestureRecognizer()..onStart = _onDragStart;

  _dragEventInfo = _DragEventInfo(this);
}