dispose method

  1. @mustCallSuper
void dispose()

Called by the delegate when it is no longer sending events to this object.

Implementation

@mustCallSuper
void dispose() {
  // TODO(polina-c): stop duplicating code across disposables
  // https://github.com/flutter/flutter/issues/137435
  if (kFlutterMemoryAllocationsEnabled) {
    FlutterMemoryAllocations.instance.dispatchObjectDisposed(object: this);
  }
  _lastDetails = null;
  onDragCanceled?.call();
}