isStream method

bool isStream(
  1. Map<String, String>? headers, [
  2. String? responseType = "json"
])

Implementation

bool isStream(Map<String, String>? headers, [String? responseType = "json"]) {
  if ([headers?["Content-Type"], headers?["content-type"]]
          .contains("multipart/form-data") ||
      responseType == "stream") return true;
  return false;
}