didStopTrackingLastPointer method

  1. @override
void didStopTrackingLastPointer(
  1. int pointer
)
override

Called when the number of pointers this recognizer is tracking changes from one to zero.

The given pointer ID is the ID of the last pointer this recognizer was tracking.

Implementation

@override
void didStopTrackingLastPointer(int pointer) {
  assert(_state != _DragState.ready);
  switch (_state) {
    case _DragState.ready:
      break;

    case _DragState.possible:
      resolve(GestureDisposition.rejected);
      _checkCancel();

    case _DragState.accepted:
      _checkEnd(pointer);
  }
  _hasDragThresholdBeenMet = false;
  _velocityTrackers.clear();
  _initialButtons = null;
  _state = _DragState.ready;
}