finish method Null safety

void finish()

Implementation

void finish() {
  if (_outputStream == null) {
    return;
  }
  // At the end of the archive file there are two 512-byte blocks filled
  // with binary zeros as an end-of-file marker.
  final eof = Uint8List(1024);
  _outputStream.writeBytes(eof);
  _outputStream.flush();
  _outputStream = null;
}