FetchStrategyBuilder constructor

const FetchStrategyBuilder({
  1. Duration timeout = const Duration(seconds: 30),
  2. Duration totalFetchTimeout = const Duration(minutes: 1),
  3. int maxAttempts = 5,
  4. Duration initialPauseBetweenRetries = const Duration(seconds: 1),
  5. num exponentialBackoffMultiplier = 2,
  6. TransientHttpStatusCodePredicate transientHttpStatusCodePredicate = defaultTransientHttpStatusCodePredicate,
})

Creates a fetch strategy builder.

All parameters must be non-null.

Implementation

const FetchStrategyBuilder({
  this.timeout = const Duration(seconds: 30),
  this.totalFetchTimeout = const Duration(minutes: 1),
  this.maxAttempts = 5,
  this.initialPauseBetweenRetries = const Duration(seconds: 1),
  this.exponentialBackoffMultiplier = 2,
  this.transientHttpStatusCodePredicate =
      defaultTransientHttpStatusCodePredicate,
});