SocketRestorableChunkedFileHandler<ResponseType> constructor

const SocketRestorableChunkedFileHandler<ResponseType>({
  1. required XFile file,
  2. required String presentPath,
  3. required ChunkPathCallback chunkPath,
  4. required StatusPathCallback statusPath,
  5. required PresentParser<ResponseType> presentParser,
  6. required StatusParser<ResponseType> statusParser,
  7. int? chunkSize,
  8. String presentMethod = kPresentMethod,
  9. String chunkMethod = kChunkMethod,
  10. String statusMethod = kStatusMethod,
  11. Map<String, String>? presentHeaders,
  12. PresentHeadersCallback? presentHeadersCallback,
  13. RestorableChunkHeadersCallback? chunkHeaders,
  14. StatusHeadersCallback? statusHeaders,
  15. String? presentBody,
  16. String? chunkBody,
  17. String? statusBody,
  18. String fileKey = kFileKey,
  19. ChunkParser<ResponseType> chunkParser = kChunkParser,
})

A common interface for any plugin that wants to handle file uploads using a socket client.

set chunkSize to choose the size of the chunks else defaultChunkSize is used

Implementation

const SocketRestorableChunkedFileHandler({
  required super.file,
  required this.presentPath,
  required this.chunkPath,
  required this.statusPath,
  required this.presentParser,
  required this.statusParser,
  super.chunkSize,
  this.presentMethod = kPresentMethod,
  this.chunkMethod = kChunkMethod,
  this.statusMethod = kStatusMethod,
  this.presentHeaders,
  this.presentHeadersCallback,
  this.chunkHeaders,
  this.statusHeaders,
  this.presentBody,
  this.chunkBody,
  this.statusBody,
  this.fileKey = kFileKey,
  this.chunkParser = kChunkParser,
});