Task class abstract
Abstract class representing a task for upload or download.
This class manages the state and events of a task, similar to UploadTask or DownloadTask.
It implements Future
- Implemented types
- Implementers
- Available Extensions
Constructors
- Task({required dynamic data, required FusabaseStorage storage, required Reference ref, required dynamic help, SettableMetadata? metadata})
- Constructs a new Task instance.
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- snapshot → TaskSnapshot
-
Gets the current task snapshot.
no setter
-
snapshotEvents
→ Stream<
TaskSnapshot> -
Gets the stream of task snapshots.
no setter
- storage → FusabaseStorage
-
final
Methods
-
asStream(
) → Stream< TaskSnapshot> -
Creates a Stream containing the result of this future.
override
-
cancel(
) → Future< bool> - Cancels the task.
-
catchError(
Function onError, {bool test(Object error)?}) → Future< TaskSnapshot> -
Handles errors emitted by this Future.
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
pause(
) → Future< bool> - Pauses the task.
-
resume(
) → Future< bool> - Resumes the task.
-
then<
S> (FutureOr< S> onValue(TaskSnapshot), {Function? onError}) → Future<S> -
Register callbacks to be called when this future completes.
override
-
timeout(
Duration timeLimit, {FutureOr< TaskSnapshot> onTimeout()?}) → Future<TaskSnapshot> -
Stop waiting for this future after
timeLimithas passed.override -
toString(
) → String -
A string representation of this object.
inherited
-
whenComplete(
FutureOr action()) → Future< TaskSnapshot> -
Registers a function to be called when this future completes.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited