clear method

void clear()

Cancel all inflight requests.

Note: This doesn't actually cancel the underlying requests, it just clears the tracking. Use CancelToken for actual cancellation.

Implementation

void clear() {
  final keys = _inflight.keys.toList();
  _inflight.clear();
  for (final key in keys) {
    onInflightChanged?.call(key, false);
  }
}