didStopTrackingLastPointer method

  1. @override
void didStopTrackingLastPointer (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) {
  switch (_state) {
    case _ScaleState.possible:
      resolve(GestureDisposition.rejected);
      break;
    case _ScaleState.ready:
      assert(false); // We should have not seen a pointer yet
      break;
    case _ScaleState.accepted:
      break;
    case _ScaleState.started:
      assert(false); // We should be in the accepted state when user is done
      break;
  }
  _state = _ScaleState.ready;
}