SecretaryTask<K, T> class

Constructors

SecretaryTask({required K key, required Task<T> task, Validator<T>? validator, Callback<T>? onComplete, Callback<ErrorEvent<K, T>>? onError, RetryTest retryIf = RetryIf.alwaysRetry, required QueuePolicy retryPolicy, Duration retryDelay = Duration.zero, required int maxAttempts, List<Result<T, Object>> results = const [], required Completer<Result<T, Object>> completer, required Completer<Result<T, Object>> finalCompleter})
const

Properties

attempts int
no setter
canRetry bool
no setter
completer Completer<Result<T, Object>>
final
errors List<Object>
no setter
failed bool
no setter
finalCompleter Completer<Result<T, Object>>
final
finished bool
no setter
hashCode int
The hash code for this object.
no setterinherited
key → K
final
lastResult Result<T, Object>?
no setter
maxAttempts int
final
onComplete Callback<T>?
final
onError Callback<ErrorEvent<K, T>>?
final
results List<Result<T, Object>>
final
retryDelay Duration
final
retryIf RetryTest
final
retryPolicy QueuePolicy
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
succeeded bool
no setter
task Task<T>
final
validator Validator<T>?
final

Methods

copyWith({K? key, Task<T>? task, Validator<T>? validator, Callback<T>? onComplete, Callback<ErrorEvent<K, T>>? onError, RetryTest? retryIf, QueuePolicy? retryPolicy, Duration? retryDelay, int? maxAttempts, List<Result<T, Object>>? results, Completer<Result<T, Object>>? completer, Completer<Result<T, Object>>? finalCompleter}) SecretaryTask<K, T>
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited
withError(Object error) SecretaryTask<K, T>
withResult(Result<T, Object> result) SecretaryTask<K, T>
withSuccess(T result) SecretaryTask<K, T>

Operators

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