setup method

void setup(
  1. BaseOptions? baseOptions,
  2. List<Interceptor>? interceptors,
  3. bool useLogInterceptor
)

Implementation

void setup(
  BaseOptions? baseOptions,
  List<Interceptor>? interceptors,
  bool useLogInterceptor,
) {
  _dioClient = Dio(baseOptions);

  _dioClient.interceptors.addAll(interceptors ?? []);
  if (useLogInterceptor) {
    _dioClient.interceptors.add(LogInterceptor(
      requestBody: true,
      responseBody: true,
    ));
  }
}