SftpFileWriter constructor

SftpFileWriter(
  1. SftpFile file,
  2. Stream<Uint8List> stream,
  3. int offset,
  4. dynamic onProgress(
    1. int bytes
    )?,
)

Creates a new SftpFileWriter. The upload process is started immediately after construction.

Implementation

SftpFileWriter(this.file, this.stream, this.offset, this.onProgress) {
  _subscription =
      stream.transform(MaxChunkSize(chunkSize)).listen(_handleLocalData);

  _subscription.onDone(_handleLocalDone);
}