DioFileHandler class

DioFileHandler handle the file upload using the dio.Dio.request

Inheritance

Constructors

DioFileHandler({required Dio client, required XFile file, required String path, String method = kFileUploadMethod, Map<String, String>? headers, String? body, String fileKey = kFileKey, ChunkParser<Response> fileParser = kChunkParser, FileHeadersCallback? headersCallback, CancelToken? cancelToken})
client used to upload the file
const

Properties

body String?
request body
finalinherited
cancelToken → CancelToken?
Controls cancellation of dio.Dio's requests.
final
file → XFile
The file to upload.
no setterinherited
fileKey String
request key for file
finalinherited
fileParser → ChunkParser<Response>
callback to validate chunk upload
finalinherited
hashCode int
The hash code for this object.
no setterinherited
headers Map<String, String>?
request headers
finalinherited
headersCallback FileHeadersCallback?
request headers
finalinherited
method String
request method, default to POST
finalinherited
originalFile → XFile
The file to upload.
finalinherited
path String
request path
finalinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited
upload(XFile file, {ProgressCallback? onProgress}) Future<void>
Method for uploading the entire file.

Operators

operator ==(Object other) bool
The equality operator.
inherited