title: The argument type 'void Function(DioError)' can't be assigned to the parameter type 'void Function(DioError, ErrorInterceptorHandler)?'
body: <p>so I'm wrapping my HTTP requests with a few simple functions. Like Following:</p>
  <pre><code>import 'package:dio/dio.dart';
  
  class HttpService {
    late Dio _dio;
  
    final String baseUrl = &quot;http://10.0.2.2:8080/community&quot;;
  
    HttpService() {
      _dio = Dio(BaseOptions(
        baseUrl: baseUrl,
      ));
  
      // initializaInterceptors();
    }
  
    Future&lt;Response&gt; getRequest(String endPoint) async {
      Response response;
      try {
        response = await _dio.get(endPoint);
      } on DioError catch (e) {
        print(e.message);
        throw Exception(e.message);
      }
  
      return response;
    }
  
    Future&lt;Response&gt; postRequest(String endPoint) async {
      Response response;
      try {
        response = await _dio.post(endPoint);
      } on DioError catch (e) {
        print(e.message);
        throw Exception(e.message);
      }
  
      return response;
    }
  
    initializaInterceptors() {
        _dio.interceptors.add(InterceptorsWrapper(onError: (error) {
          print(error.message);
        }, onRequest: (request) {
          print(&quot;${request.method} ${request.path}&quot;);
        }, onResponse: (response) {
          print(response.data);
        }));
      }
    }
  }
  </code></pre>
  <p>It works fine in the past months. However, it just pops an error in initializaInterceptors() function:</p>
  <blockquote>
  <p>The argument type 'void Function(DioError)' can't be assigned to the
  parameter type 'void Function(DioError, ErrorInterceptorHandler)?'.
  The argument type 'void Function(RequestOptions)' can't be assigned to
  the parameter type 'void Function(RequestOptions,
  RequestInterceptorHandler)?'. The argument type 'void
  Function(Response)' can't be assigned to the parameter type
  'void Function(Response, ResponseInterceptorHandler)?'.</p>
  </blockquote>
  <p>Does anyone know what is going on? Thanks</p>