cancelUploadRequest method Null safety

bool cancelUploadRequest(
  1. String requestId
)

Implementation

bool cancelUploadRequest(String requestId) {
  final req = uploadRequests[requestId];
  if (req != null) {
    req.cancel();
    uploadRequests.remove(requestId);
    return true;
  }
  return false;
}