UpChunk class

Constructors

UpChunk({required String endPoint, required XFile file, Map<String, String> headers = const {}, int chunkSize = 5120, int attempts = 5, int delayBeforeAttempt = 1, void onOnline()?, void onOffline()?, void onAttempt(int chunkNumber, int chunkSize)?, void onAttemptFailure(String message, int chunkNumber, int attemptsLeft)?, void onError(String message, int chunk, int attempts)?, void onSuccess()?, void onProgress(double progress)?})
Internal constructor used by createUpload

Properties

attempts int
final
chunkSize int
final
delayBeforeAttempt int
final
endPoint String
final
file XFile
final
hashCode int
The hash code for this object.
no setterinherited
headers Map<String, String>
final
onAttempt → (void Function(int chunkNumber, int chunkSize)?)
final
onAttemptFailure → (void Function(String message, int chunkNumber, int attemptsLeft)?)
final
onError → (void Function(String message, int chunk, int attempts)?)
final
onOffline → (void Function()?)
final
onOnline → (void Function()?)
final
onProgress → (void Function(double progress)?)
final
onSuccess → (void Function()?)
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
successfulChunkUploadCodes List<int>
HTTP response codes implying the PUT method has been successful
final
temporaryErrorCodes List<int>
HTTP response codes implying a chunk may be retried
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
pause() → void
It pauses the upload, the _chunk currently being uploaded will finish first before pausing the next _chunk
restart() → void
Restarts the upload after if the upload failed and came to a complete stop
resume() → void
It resumes the upload for the next _chunk
stop() → void
toString() String
A string representation of this object.
inherited

Operators

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