initialize method

BasicDio initialize({
  1. BasicDioOptions? options,
  2. BasicDioOptions? downloadOptions,
  3. dynamic httpClientAdapter,
  4. dynamic transformer,
  5. List interceptors = const [],
})

Implementation

BasicDio initialize({
  BasicDioOptions? options,
  BasicDioOptions? downloadOptions,
  HttpClientAdapter? httpClientAdapter,
  Transformer? transformer,
  List<InterceptorsWrapper> interceptors = const [],
}) {
  if (options != null) basicDioOptions = options;
  dio = ExtendedDio().initialize(
      interceptors: [
        ...interceptors,
        if (isDebugger) DebuggerInterceptor(),
        if (isDebug)
          LoggerInterceptor(filteredApi: options?.filteredApi ?? [])
      ],
      options: basicDioOptions,
      transformer: transformer,
      httpClientAdapter: httpClientAdapter,
      downloadOptions: downloadOptions);
  return this;
}