FlutterUploader class
Controls task scheduling and allows developers to observe the status. The class is designed as a singleton and can therefore be instantiated as often as needed.
Constructors
- FlutterUploader()
-
Default constructor which returns the same object on future calls (singleton).
factory
- FlutterUploader.private(MethodChannel channel, EventChannel progressChannel, EventChannel resultChannel)
- Only required for testing.
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
-
progress
→ Stream<
UploadTaskProgress> -
Stream to listen on upload progress
no setter
-
result
→ Stream<
UploadTaskResponse> -
Stream to listen on upload result
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
cancel(
{required String taskId}) → Future< void> - Cancel a given upload task
-
cancelAll(
) → Future< void> - Cancel all enqueued and running upload tasks
-
clearUploads(
) → Future< void> - Clears all previously downloaded files from the database. The uploader, through it's various platform implementations, will keep a list of successfully uploaded files (or failed uploads).
-
enqueue(
Upload upload) → Future< String> -
Enqueues a new upload task described by
upload
. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
setBackgroundHandler(
Function backgroundHandler) → Future< void> -
This call is required to receive background notifications.
backgroundHandler
is a top level function which will be invoked by Android -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited