Task<T, E> class abstract

Implementers

Constructors

Task.new()

Properties

hashCode int
The hash code for this object.
no setterinherited
id String
unique task id (UUID v1 time based)
final
isCancelled bool
no setter
isCompleted bool
no setter
isFailed bool
no setter
isIdle bool
no setter
isPending bool
no setter
isRunning bool
no setter
name String
no setter
result TaskResult<T, E>?
The result of the task if completed Contains the value, error and stack trace
getter/setter pair
resultAsync Future<T?>
The result of the task as a future
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
status TaskStatus
The current status of the task
no setter

Methods

cancel() → void
Manually cancel the task
execute() Future<T>
The logic to execute the task. Shouldn't be called directly but rather through run
isErrorOfType(Type type) bool
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
run({OnTaskEvent? onEvent}) → CancelableOperation<T>
Runs the task operation and returns the result
toString() String
A string representation of this object.
inherited

Operators

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