DioChunkedFileHandler class
DioChunkedFileHandler handle the file upload in chunks
- Inheritance
-
- Object
- SocketChunkedFileHandler<
Response> - DioChunkedFileHandler
Constructors
-
DioChunkedFileHandler({required Dio client, required XFile file, required String path, String method = kFileUploadMethod, ChunkHeadersCallback? headers, String? body, int? chunkSize, String fileKey = kFileKey, ChunkParser<
Response> chunkParser = kChunkParser, CancelToken? cancelToken}) -
clientused to upload the fileconst
Properties
- body → String?
-
request
bodyfinalinherited - cancelToken → CancelToken?
-
Controls cancellation of
dio.Dio's requests.final -
chunkParser
→ ChunkParser<
Response> -
callback to validate chunk upload
finalinherited
- chunkSize → int?
-
chunk size, if null
defaultChunkSizeis usedfinalinherited - file → XFile
-
The file to upload.
no setterinherited
- fileKey → String
-
request key for file
finalinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- headers → ChunkHeadersCallback?
-
request
headersfinalinherited - method → String
-
request
method, default toPOSTfinalinherited - originalFile → XFile
-
The file to upload.
finalinherited
- path → String
-
request
pathfinalinherited - 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
-
uploadChunk(
FileChunk chunk, {ProgressCallback? onProgress}) → Future< void> -
method to handle the upload of a
FileChunk
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited