createRetryClient static method

Dio createRetryClient([
  1. DebugModel? model
])

The Dio used to retry model: retryClientBuilder if set, otherwise the Dio that sent the request (keeps certificate pinning and options), otherwise a plain Dio().

Implementation

static Dio createRetryClient([DebugModel? model]) {
  final custom = retryClientBuilder?.call();
  if (custom != null) return custom;
  final original = model?.requestOptions.extra[DebugLogging.clientKey];
  return original is Dio ? original : Dio();
}