DioProvider class abstract
Provides access to the configured Dio instance
This prevents interceptors from losing configuration when they need to retry requests. Instead of creating new Dio instances, interceptors should use the injected provider to access the configured instance.
Example:
class MyInterceptor extends Interceptor {
final DioProvider dioProvider;
MyInterceptor(this.dioProvider);
Future<Response> retry(RequestOptions options) {
return dioProvider.dio.fetch(options); // ✅ Keeps all interceptors
}
}
- Implementers
Constructors
Properties
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited