DioChunkedFileHandler constructor

const DioChunkedFileHandler({
  1. required Dio client,
  2. required XFile file,
  3. required String path,
  4. String method = kFileUploadMethod,
  5. ChunkHeadersCallback? headers,
  6. String? body,
  7. int? chunkSize,
  8. String fileKey = kFileKey,
  9. ChunkParser<Response> chunkParser = kChunkParser,
  10. CancelToken? cancelToken,
})

client used to upload the file

path, method, headers, body are send parameters

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

Implementation

const DioChunkedFileHandler({
  required dio.Dio client,
  required super.file,
  required super.path,
  super.method,
  super.headers,
  super.body,
  super.chunkSize,
  super.fileKey,
  super.chunkParser,
  this.cancelToken,
}) : _client = client;