DioInterceptor constructor

DioInterceptor({
  1. required Dio dio,
  2. HttpRequestMatcher matcher = const FullHttpRequestMatcher(),
  3. bool printLogs = false,
  4. bool failOnMissingMock = true,
})

Constructs a DioInterceptor and configures the passed Dio instance.

Implementation

DioInterceptor({
  required this.dio,
  this.matcher = const FullHttpRequestMatcher(),
  this.printLogs = false,
  this.failOnMissingMock = true,
}) {
  dio.interceptors.add(this);
  logger = getLogger(printLogs);
}