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