DioService constructor

DioService({
  1. required Dio dioClient,
  2. CacheOptions? globalCacheOptions,
  3. Iterable<Interceptor>? interceptors,
  4. HttpClientAdapter? httpClientAdapter,
})

Implementation

DioService({
  required Dio dioClient,
  this.globalCacheOptions,
  Iterable<Interceptor>? interceptors,
  HttpClientAdapter? httpClientAdapter,
})  : _dio = dioClient,
      _cancelToken = CancelToken() {
  if (interceptors != null) {
    _dio.interceptors.addAll(interceptors);
  }
  if (httpClientAdapter != null) {
    _dio.httpClientAdapter = httpClientAdapter;
  }
}