ResumableUploadAdapter class
Resumable chunked upload adapter.
Uploads files in byte-range chunks and resumes from the last confirmed server byte offset instead of restarting from 0% if interrupted.
- Implemented types
Constructors
- ResumableUploadAdapter({Dio? dio, int chunkSize = 1024 * 1024})
Properties
- chunkSize → int
-
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- id → String
-
Unique identifier of this adapter (e.g. 'dio', 'resumable', 'tus', 's3').
no setteroverride
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- supportsResuming → bool
-
Whether this adapter supports resuming from a previously confirmed byte offset.
no setteroverride
Methods
-
cancel(
String taskId) → Future< void> -
Cancels an active upload associated with
taskId.override -
dispose(
) → Future< void> -
Closes and releases any adapter network clients or resources.
override
-
getConfirmedOffset(
UploadTask task) → Future< int> -
Queries the remote server for the number of bytes already uploaded for
task.override -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
pause(
String taskId) → Future< void> -
Pauses an active upload associated with
taskId.override -
toString(
) → String -
A string representation of this object.
inherited
-
upload(
{required UploadTask task, required UploadProgressCallback onProgress, required CancelToken cancelToken}) → Future< UploadResponse> -
Performs the actual file upload for
task.override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited