TaskStatus enum

Defines a set of possible states which a Task can be in.

Inheritance
Available extensions

Values

enqueued → const TaskStatus

Task is enqueued on the native platform and waiting to start

It may wait for resources, or for an appropriate network to become available before starting the actual download and changing state to running.

running → const TaskStatus

Task is running, i.e. actively downloading

complete → const TaskStatus

Task has completed successfully

This is a final state

failed → const TaskStatus

Task has failed due to an exception

This is a final state

canceled → const TaskStatus

Task has been canceled by the user or the system

This is a final state

waitingToRetry → const TaskStatus

Task failed, and is now waiting to retry

The task is held in this state until the exponential backoff time for this retry has passed, and will then be rescheduled on the native platform, switching state to enqueued and then running

Properties

hashCode int
The hash code for this object.
no setterinherited
index int
A numeric identifier for the enumerated value.
no setterinherited
isFinalState bool
True if this state is one of the 'final' states, meaning no more state changes are possible
no setter
isNotFinalState bool
True if this state is not a 'final' state, meaning more state changes are possible
no setter
name String

Available on Enum, provided by the EnumName extension

The name of the enum value.
no setter
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

Operators

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

Constants

values → const List<TaskStatus>
A constant List of the values in this enum, in order of their declaration.