VenturoApiInterceptor class

Venturo API Interceptor This class provides configuration options for API interceptors.

It allows enabling/disabling logging, retry mechanisms, security, token authentication, and Sentry error reporting.

Configuration class for API interceptors.

This class controls various interceptor settings such as logging, retry mechanisms, security, token authentication, and Sentry integration.

Constructors

VenturoApiInterceptor.new({bool useLogger = true, bool useRetry = true, bool useSecurity = true, bool useToken = true, bool useSentry = false, void onRequestToken()?, void onResponseSecurityNotValid(Response response, ResponseInterceptorHandler handler)?, void onResponseSecurityValid()?, String? tokenKey, @Deprecated(''' Since 1.0.0-beta.9: Use VenturoApiSecurity in the VenturoApiConfig argument to determine the Hash. ''') Hash hash = Hash.SHA256, bool errorExclude(DioException err, ErrorInterceptorHandler handler)?, String errorTitle(DioException err, ErrorInterceptorHandler handler)?, @Deprecated(''' Since 1.0.2: Use onErrorSentryEvent in the VenturoApiConfig argument to determine the custom sentry event. ''') List<VentSentryEvent>? errorSentryEvent, List<VentSentryEvent> onErrorSentryEvent(Scope scope, DioException err, ErrorInterceptorHandler handler)?})
Constructs an instance of VenturoApiInterceptor.
const

Properties

errorExclude bool Function(DioException err, ErrorInterceptorHandler handler)?
A function to determine if an error should be excluded from retry handling.
final
errorSentryEvent List<VentSentryEvent>?
A list of Sentry events for error tracking and monitoring.
final
errorTitle String Function(DioException err, ErrorInterceptorHandler handler)?
A function that generates a custom error title based on the error details.
final
hash Hash
Deprecated: Since 1.0.0-beta.9.
final
hashCode int
The hash code for this object.
no setterinherited
onErrorSentryEvent List<VentSentryEvent> Function(Scope scope, DioException err, ErrorInterceptorHandler handler)?
final
onRequestToken → void Function()?
Callback function triggered when a token request is made.
final
onResponseSecurityNotValid → void Function(Response response, ResponseInterceptorHandler handler)?
Callback function triggered when security validation fails.
final
onResponseSecurityValid → void Function()?
Callback function triggered when security validation passes.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
tokenKey String?
The key used for storing and retrieving authentication tokens.
final
useLogger bool
Enables or disables logging.
final
useRetry bool
Enables or disables automatic retry mechanism.
final
useSecurity bool
Enables or disables API security verification.
final
useSentry bool
Enables or disables Sentry error tracking.
final
useToken bool
Enables or disables token-based authentication.
final

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