SocketFileHandler<ResponseType> constructor

const SocketFileHandler<ResponseType>({
  1. required XFile file,
  2. required String path,
  3. String method = kFileUploadMethod,
  4. Map<String, String>? headers,
  5. String? body,
  6. String fileKey = kFileKey,
  7. FileHeadersCallback? headersCallback,
  8. ChunkParser<ResponseType> fileParser = kChunkParser,
})

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

path, method, headers, body are request parameters

Implementation

const SocketFileHandler({
  required super.file,
  required this.path,
  this.method = kFileUploadMethod,
  this.headers,
  this.body,
  this.fileKey = kFileKey,
  this.headersCallback,
  this.fileParser = kChunkParser,
});