cancel method

bool cancel(
  1. int hashCode
)

Implementation

bool cancel(int hashCode) {
  final completer = _completers.remove(hashCode);
  if (completer != null && !completer.isCompleted) {
    if (_currentOp?.onCancel != null) {
      _currentOp?.onCancel!();
    }
    completer.complete();
    return true;
  }
  return false;
}