RetryPredicate typedef
RetryPredicate =
bool Function(Object error, StackTrace stackTrace)
Decides whether error should be retried.
Return false for permanent failures such as validation errors. When this is omitted, every error except TaskCancelledException is retried until the retry policy's attempt budget is spent.
A predicate that throws is treated as "do not retry".
Implementation
typedef RetryPredicate = bool Function(Object error, StackTrace stackTrace);