DioFileHandler class
DioFileHandler handle the file upload using the dio.Dio.request
- Inheritance
-
- Object
- SocketFileHandler<
Response> - DioFileHandler
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}) -
clientused to upload the fileconst
Properties
- body → String?
-
request
bodyfinalinherited - 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
headersfinalinherited - headersCallback → FileHeadersCallback?
-
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
-
upload(
XFile file, {ProgressCallback? onProgress}) → Future< void> - Method for uploading the entire file.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited