BackgroundTask<T> class

Constructors

BackgroundTask({required String id, required String name, required TaskFunction<T> function, TaskPriority priority = TaskPriority.normal, Duration? timeout})

Properties

cancelRequested → bool
no setter
createdAt → DateTime
no setter
elapsed → Duration?
no setter
endTime → DateTime?
no setter
hashCode → int
The hash code for this object.
no setterinherited
id → String
final
isRunning → bool
no setter
isTerminal → bool
no setter
log → TaskLog
final
name → String
final
priority → TaskPriority
final
progress → TaskProgress
no setter
result → TaskResult<T>?
no setter
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
startTime → DateTime?
no setter
status → TaskStatus
no setter
timeout → Duration?
final

Methods

cancel([String reason = 'Cancelled by user']) → void
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
run() → Future<TaskResult<T>>
toJson() → Map<String, dynamic>
toString() → String
A string representation of this object.
inherited
waitForCompletion() → Future<TaskResult<T>>

Operators

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