writeContent method Null safety

void writeContent(
  1. OutputStreamBase output,
  2. {bool freeMemory = true}
)

Implementation

void writeContent(OutputStreamBase output, {bool freeMemory = true}) {
  if (_content is List<int>) {
    output.writeBytes(_content as List<int>);
  } else if (_content is InputStreamBase) {
    output.writeInputStream(_content as InputStreamBase);
  } else if (_rawContent != null) {
    decompress();
    output.writeBytes(_content as List<int>);
    // Release memory
    if (freeMemory) {
      _content = null;
    }
  }
}