TaskResult.failure constructor
Task failed permanently.
The task will be retried according to the RetryPolicy, and if all retries are exhausted, the chain (if any) will fail and invoke the failure handler.
Implementation
const factory TaskResult.failure({
String? message,
Object? error,
}) = TaskFailure;