The argument type 'void Function(DioError)' can't be assigned to the parameter type 'void Function(DioError, ErrorInterceptorHandler)?' The argument type 'void Function(DioError)' can't be assigned to the parameter type 'void Function(DioError, ErrorInterceptorHandler)?' dart dart

The argument type 'void Function(DioError)' can't be assigned to the parameter type 'void Function(DioError, ErrorInterceptorHandler)?'


initializeInterceptor(){    _dio.interceptors.add(InterceptorsWrapper(        onError: (error, errorInterceptorHandler ){          print(error.message);        },        onRequest: (request, requestInterceptorHandler){          print("${request.method} | ${request.path}");        },        onResponse: (response, responseInterceptorHandler) {          print('${response.statusCode} ${response.statusCode} ${response.data}');        }    ));  }