VooDioInterceptor class

Dio interceptor for automatic network logging

This is a template that shows how to integrate VooLogger with Dio. You'll need to adapt this to your specific Dio version and setup.

Usage example:

import 'package:dio/dio.dart';

final dio = Dio();
final interceptor = VooDioInterceptor();

dio.interceptors.add(InterceptorsWrapper(
  onRequest: (options, handler) => interceptor.onRequest(options, handler),
  onResponse: (response, handler) => interceptor.onResponse(response, handler),
  onError: (error, handler) => interceptor.onError(error, handler),
));

Constructors

VooDioInterceptor.new({NetworkInterceptor? interceptor})

Properties

hashCode int
The hash code for this object.
no setterinherited
interceptor NetworkInterceptor
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
onError(dynamic error, dynamic handler) → void
Call this in Dio's onError interceptor The error parameter should be DioException/DioError from Dio
onRequest(dynamic options, dynamic handler) → void
Call this in Dio's onRequest interceptor The options parameter should be RequestOptions from Dio
onResponse(dynamic response, dynamic handler) → void
Call this in Dio's onResponse interceptor The response parameter should be Response from Dio
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited