initialize method

BaseDio initialize({
  1. BaseDioOptions? options,
  2. BaseDioOptions? downloadOptions,
  3. HttpClientAdapter? httpClientAdapter,
  4. Transformer? transformer,
  5. List<InterceptorsWrapper> interceptors = const [],
})

Implementation

BaseDio initialize({
  BaseDioOptions? options,
  BaseDioOptions? downloadOptions,
  HttpClientAdapter? httpClientAdapter,
  Transformer? transformer,
  List<InterceptorsWrapper> interceptors = const [],
}) {
  if (options != null) baseDioOptions = options;
  dio = ExtendedDio().initialize(
      interceptors: [
        ...interceptors,
        if (isDebugger) DebuggerInterceptor(),
      ],
      options: baseDioOptions,
      transformer: transformer,
      httpClientAdapter: httpClientAdapter,
      downloadOptions: downloadOptions);
  return this;
}