ISpectDioInterceptorSettingsBuilder class
Builder for ISpectDioInterceptorSettings providing fluent API.
{@tool snippet}
final settings = ISpectDioInterceptorSettingsBuilder()
.withRequestHeaders()
.withResponseHeaders()
.withRedaction()
.build();
{@end-tool}
Constructors
- ISpectDioInterceptorSettingsBuilder()
- Creates a builder with default settings (moderate verbosity).
- ISpectDioInterceptorSettingsBuilder.development()
-
Development: verbose logging, redaction enabled.
factory
- ISpectDioInterceptorSettingsBuilder.disabled()
-
Logging disabled.
factory
- ISpectDioInterceptorSettingsBuilder.production()
-
Production: errors only, redaction enabled.
factory
- ISpectDioInterceptorSettingsBuilder.staging()
-
Staging: requests + errors, redaction enabled.
factory
Properties
- enabled ↔ bool
-
getter/setter pairinherited
- enableRedaction ↔ bool
-
getter/setter pairinherited
-
errorChain
↔ NetworkFilterChain<
DioException> ? -
getter/setter pairinherited
- errorFilter ↔ bool Function(DioException)?
-
getter/setter pairinherited
- errorPen ↔ AnsiPen?
-
getter/setter pairinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- printErrorData ↔ bool
-
getter/setter pairinherited
- printErrorHeaders ↔ bool
-
getter/setter pairinherited
- printErrorMessage ↔ bool
-
getter/setter pairinherited
- printRequestData ↔ bool
-
getter/setter pairinherited
- printRequestHeaders ↔ bool
-
getter/setter pairinherited
- printResponseData ↔ bool
-
getter/setter pairinherited
- printResponseHeaders ↔ bool
-
getter/setter pairinherited
- printResponseMessage ↔ bool
-
getter/setter pairinherited
-
requestChain
↔ NetworkFilterChain<
RequestOptions> ? -
getter/setter pairinherited
- requestFilter ↔ bool Function(RequestOptions)?
-
getter/setter pairinherited
- requestPen ↔ AnsiPen?
-
getter/setter pairinherited
-
responseChain
↔ NetworkFilterChain<
Response> ? -
getter/setter pairinherited
- responseFilter ↔ bool Function(Response)?
-
getter/setter pairinherited
- responsePen ↔ AnsiPen?
-
getter/setter pairinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
applyDevelopmentDefaults(
) → void -
Applies development preset: all headers, all data, redaction enabled.
inherited
-
applyProductionDefaults(
) → void -
Applies production preset: errors only, redaction enabled.
inherited
-
applyStagingDefaults(
) → void -
Applies staging preset: request data + errors, redaction enabled.
inherited
-
build(
) → ISpectDioInterceptorSettings - Builds the concrete settings object. Subclasses must override to construct the package-specific settings type.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
withAllData(
) → ISpectDioInterceptorSettingsBuilder -
Enables printing of all data (request, response, error).
inherited
-
withAllHeaders(
) → ISpectDioInterceptorSettingsBuilder -
Enables printing of all headers (request, response, error).
inherited
-
withDisabled(
) → ISpectDioInterceptorSettingsBuilder -
Disables the interceptor.
inherited
-
withEnabled(
) → ISpectDioInterceptorSettingsBuilder -
Enables the interceptor (enabled by default).
inherited
-
withErrorChain(
NetworkFilterChain< DioException> chain) → ISpectDioInterceptorSettingsBuilder -
Sets a
NetworkFilterChainfor error filtering.inherited -
withErrorData(
) → ISpectDioInterceptorSettingsBuilder -
Enables printing of error data.
inherited
-
withErrorFilter(
bool filter(DioException)) → ISpectDioInterceptorSettingsBuilder -
Sets a custom error filter callback.
inherited
-
withErrorHeaders(
) → ISpectDioInterceptorSettingsBuilder -
Enables printing of error headers.
inherited
-
withErrorMessage(
) → ISpectDioInterceptorSettingsBuilder -
Enables printing of error messages.
inherited
-
withErrorPen(
AnsiPen pen) → ISpectDioInterceptorSettingsBuilder -
Sets custom color for error logs.
inherited
-
withErrorsOnly(
) → ISpectDioInterceptorSettingsBuilder -
Configures to log only errors (disables request/response logging).
inherited
-
withoutRedaction(
) → ISpectDioInterceptorSettingsBuilder -
Disables sensitive data redaction (use only in dev/test environments).
inherited
-
withRedaction(
) → ISpectDioInterceptorSettingsBuilder -
Enables sensitive data redaction.
inherited
-
withRequestChain(
NetworkFilterChain< RequestOptions> chain) → ISpectDioInterceptorSettingsBuilder -
Sets a
NetworkFilterChainfor request filtering.inherited -
withRequestData(
) → ISpectDioInterceptorSettingsBuilder -
Enables printing of request data.
inherited
-
withRequestFilter(
bool filter(RequestOptions)) → ISpectDioInterceptorSettingsBuilder -
Sets a custom request filter callback.
inherited
-
withRequestHeaders(
) → ISpectDioInterceptorSettingsBuilder -
Enables printing of request headers.
inherited
-
withRequestPen(
AnsiPen pen) → ISpectDioInterceptorSettingsBuilder -
Sets custom color for request logs.
inherited
-
withResponseChain(
NetworkFilterChain< Response> chain) → ISpectDioInterceptorSettingsBuilder -
Sets a
NetworkFilterChainfor response filtering.inherited -
withResponseData(
) → ISpectDioInterceptorSettingsBuilder -
Enables printing of response data.
inherited
-
withResponseFilter(
bool filter(Response)) → ISpectDioInterceptorSettingsBuilder -
Sets a custom response filter callback.
inherited
-
withResponseHeaders(
) → ISpectDioInterceptorSettingsBuilder -
Enables printing of response headers.
inherited
-
withResponseMessage(
) → ISpectDioInterceptorSettingsBuilder -
Enables printing of response status messages.
inherited
-
withResponsePen(
AnsiPen pen) → ISpectDioInterceptorSettingsBuilder -
Sets custom color for response logs.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited