1. override
void didStopTrackingLastPointer(int pointer)

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.

Source

@override
void didStopTrackingLastPointer(int pointer) {
  if (_state == _DragState.possible) {
    resolve(GestureDisposition.rejected);
    _state = _DragState.ready;
    if (onCancel != null)
      invokeCallback/*<Null>*/('onCancel', onCancel); // ignore: STRONG_MODE_INVALID_CAST_FUNCTION_EXPR, https://github.com/dart-lang/sdk/issues/27504
    return;
  }
  bool wasAccepted = (_state == _DragState.accepted);
  _state = _DragState.ready;
  if (wasAccepted && onEnd != null) {
    VelocityTracker tracker = _velocityTrackers[pointer];
    assert(tracker != null);

    Velocity velocity = tracker.getVelocity();
    if (velocity != null && _isFlingGesture(velocity)) {
      final Offset pixelsPerSecond = velocity.pixelsPerSecond;
      if (pixelsPerSecond.distanceSquared > kMaxFlingVelocity * kMaxFlingVelocity)
        velocity = new Velocity(pixelsPerSecond: (pixelsPerSecond / pixelsPerSecond.distance) * kMaxFlingVelocity);
      invokeCallback/*<Null>*/('onEnd', () => onEnd(new DragEndDetails(velocity: velocity))); // ignore: STRONG_MODE_INVALID_CAST_FUNCTION_EXPR, https://github.com/dart-lang/sdk/issues/27504
    } else {
      invokeCallback/*<Null>*/('onEnd', () => onEnd(new DragEndDetails(velocity: Velocity.zero))); // ignore: STRONG_MODE_INVALID_CAST_FUNCTION_EXPR, https://github.com/dart-lang/sdk/issues/27504
    }
  }
  _velocityTrackers.clear();
}