DioRestorableChunkedFileHandler constructor

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

client used to upload the file

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

Implementation

const DioRestorableChunkedFileHandler({
  required dio.Dio client,
  required super.file,
  required super.presentPath,
  required super.chunkPath,
  required super.statusPath,
  required super.presentParser,
  required super.statusParser,
  super.presentMethod,
  super.chunkMethod,
  super.statusMethod,
  super.presentHeaders,
  super.chunkHeaders,
  super.statusHeaders,
  super.presentBody,
  super.chunkBody,
  super.statusBody,
  super.chunkSize,
  super.fileKey,
  super.chunkParser,
  super.presentHeadersCallback,
  this.cancelToken,
}) : _client = client;