RetryPolicy.exponentialBackoff constructor
RetryPolicy.exponentialBackoff({})
指数退避重试的工厂方法
Implementation
factory RetryPolicy.exponentialBackoff({
int maxRetries = 3,
Duration baseInterval = const Duration(seconds: 1),
Duration? maxInterval,
double backoffMultiplier = 2.0,
}) {
return RetryPolicy(
maxRetries: maxRetries,
strategy: RetryStrategy.exponentialBackoff,
baseInterval: baseInterval,
maxInterval: maxInterval,
backoffMultiplier: backoffMultiplier,
);
}