ispect
library
Classes
ActionButtonRow
One labelled, full-width action button.
ActionCell
One icon action: a tile, its optional badge, and its optional caption.
ActionPanelContent
The expanded content of a DraggableActionPanel: an optional header, a grid
of icon actions, and a column of labelled buttons.
The title row above the grid, with an optional close control.
AnsiPen
Pen attributes for foreground and background colors.
BaseLogsFile
Abstract base class for cross-platform log file operations.
BaseNetworkInterceptorSettings
Base settings class for network interceptors (Dio, HTTP, etc.).
BaseNetworkInterceptorSettingsBuilder <B extends BaseNetworkInterceptorSettingsBuilder <B , TReq , TRes , TErr > , TReq , TRes , TErr >
Base builder for network interceptor settings.
BoundedByteBody
Decodes a bounded prefix of a network body for diagnostics.
BoxedLogEntryFormatter
Boxed console output: an opt-in alternative to HumanLogEntryFormatter
that frames each entry so individual logs stay distinct in a busy console.
CategoryFilter
Matches logs whose TraceKeys.category is in categories .
ComposerPickedFile
A file selected by the host application for a composed multipart request.
CompositeRedactionStrategy
Runs multiple strategies in order and returns the first redaction result.
ConsoleSettings
Configuration settings for ISpectLogger logger.
ConsoleUtils
Static helpers for console output: border lines and ANSI color mapping.
ContentExtent
A PanelExtent driven by the measured size of the expanded content.
CornerPlacement
A PanelPlacement anchored to one of the four corners.
CorrelationFilter
Matches logs with a specific TraceKeys.correlationId .
CurlUtils
Utility class for generating cURL commands from HTTP request data.
DefaultISpectLoggerHistory
In-memory ILogHistory backed by a ListQueue .
DiagnosticProcessingPolicy
Cooperative scheduling used by diagnostic import and export operations.
DiagnosticResourceLimits
Resource budgets applied while diagnostics are captured and handed off.
DraggableActionPanel
A DraggablePanel preset that expands into a grid of icon actions above a
column of labelled buttons — the shape a debug or tools panel usually takes.
DraggableActionPanelThemeData
Tokens for the action-grid preset.
DraggablePanel
A floating panel window that can be dragged, parked and grown in place.
DraggablePanelController
Reads and commands a PanelStatus .
DraggablePanelScope
Exposes the enclosing panel's controller to its own content.
DraggablePanelThemeData
Visual and motion tokens for a DraggablePanel.
ExtendedLoggerFormatter
Applies ANSI color per line and substitutes a placeholder for empty
payloads. Layout (level column, indent, metadata) is owned by
ILogEntryFormatter ; this formatter intentionally does not reshape the
incoming message so single-line and multi-line entries align identically.
FakeISpectLogger
Test double for ISpectLogger . Captures all logs for assertions.
FileLogHistory
Extended ILogHistory with daily file-based persistence.
FileLogHistoryOptions
Filter <T >
A generic filter that checks whether a given item satisfies certain
conditions. Used as a building block for more specific filter types.
FixedExtent
A PanelExtent of a constant size.
FormUrlEncodedReplayBody
An application/x-www-form-urlencoded payload.
FractionExtent
A PanelExtent expressed as a fraction of the available bounds.
FreePlacement
A PanelPlacement at an arbitrary normalized position.
The outcome of a header redaction operation.
HttpMethodFilter <T >
Passes only events whose HTTP method is in allowedMethods .
HumanLogEntryFormatter
Human-readable, grep-friendly console output.
ILogEntryFormatter
Renders a full ISpectLogData entry into a console-ready string.
ILoggerFilter
Determines whether a log message should be recorded
based on its content and log level.
ILoggerFormatter
Converts LogDetails into a formatted string for console output.
ILogHistory
Contract for log history storage.
InspectorPlugin
Base class for ISpect inspector plugins.
ISpect
The main entry point for initializing and managing logging/error handling.
ISpectActionItem
Describes a tappable action shown inside the ISpect inspector panel
(e.g. in the custom-actions grid).
ISpectBaseLogger
Console logger: formats messages via ILoggerFormatter and writes
them through a LoggerOutput function.
ISpectBuilder
A widget that wraps your app with ISpect debugging tools.
ISpectColumnBuilder
A Column whose children are produced lazily from an
IndexedWidgetBuilder , mirroring the API of ListView.builder but without
a scroll view.
ISpectDateTimeFormatter
A utility class for formatting DateTime objects into readable strings.
ISpectDynamicColor
ISpectErrorHandler
A utility class for handling errors and exceptions in ISpectLogger.
ISpectErrorHandlerOptions
Options for configuring how ISpect installs error/log handlers in the
running app.
ISpectFileUtils
A utility class for file-related operations on Web platforms.
ISpectFilter
Composite filter combining log-type-key, runtime type, and search criteria.
ISpectGeneratedLocalization
Callers can lookup localized strings with an instance of ISpectGeneratedLocalization
returned by ISpectGeneratedLocalization.of(context).
ISpectLocalization
Localization class which is used to localize app.
This class provides handy methods and tools.
ISpectLocalizations
Localization helper for ISpect.
ISpectLogData
Core log entry model. All fields are immutable after construction.
ISpectLogDataJsonUtils
Utility class for ISpectLogData JSON operations.
ISpectLogError
Log entry produced when a Dart Error is captured by the logger.
ISpectLogException
Log entry produced when a Dart Exception is captured by the logger.
ISpectLogger
Customizable logging and inspection utility for mobile applications.
ISpectLoggerOptions
Configuration for ISpectLogger behavior. Per-type colors can be overridden
via customColors; defaults come from the ISpectLogType registry.
ISpectLogType
Describes a log type - built-in or user-defined.
ISpectMetadata
Environment/runtime metadata attached to exported log files.
ISpectNavigatorObserver
A custom NavigatorObserver for logging navigation events.
ISpectObserver
Observer for monitoring ISpectLogger events.
ISpectOptions
A configuration class for ISpect, defining various options including locale settings,
feature toggles, action items, and panel configurations.
ISpectPanelButtonItem
A labelled button displayed in the ISpect expanded panel menu.
ISpectPanelData
The pieces ISpect assembles for the diagnostics panel, handed to an
ISpectPanelBuilder so consumers can return a fully customized panel
without ISpect forwarding each draggable_panel parameter individually.
ISpectPanelItem
An item displayed in the ISpect floating panel.
ISpectRedaction
Global default policy and kill-switch for all ISpect redaction.
ISpectScopeController
Provides the ISpectScopeModel to the widget tree.
ISpectScopeModel
A model class that holds the state of the ISpect scope.
ISpectSelector <T >
Rebuilds builder only when the value returned by selector changes.
ISpectSettingsState
Snapshot of every runtime-configurable ISpect setting exposed in the
Settings sheet. Serialized via toJson and restored on app restart
through ISpectOptions.initialSettings.
ISpectShareRequest
Describes content to pass into a custom share handler.
ISpectTheme
Defines the theme configuration for ISpect, including colors, icons, and log descriptions.
ISpectToaster
A utility class for displaying various types of toast notifications using SnackBar.
ISpectTraceCategory
Defines a trace category for grouping related log entries.
ISpectTraceConfig
Base configuration for trace operations.
ISpectTraceToken
Token returned by traceStart for manual span timing.
JsonReplayBody
A JSON payload serialized with Content-Type: application/json.
JsonScreen
JsonTruncator
Pretty-prints JSON objects with depth and size limits.
JsonValueNormalizer
Converts arbitrary diagnostic values into structures accepted by JSON
encoders while preserving maps and iterables.
KeyBasedRedaction
Redacts values based on key names: fully-masked keys and sensitive keys.
LogDetails
LogExporter
Utility class for batch export of log data.
LogExportOutput
Shared byte limits for outbound log documents.
LogLevelRangeFilter
Filters logs by a LogLevel range (inclusive).
LogsFileFactory
Factory class for creating platform-appropriate log file handlers.
LogsImportResult
Immutable outcome of a bounded log import.
LogsJsonService
Service for managing JSON export/import operations for logs.
LogTypeKeyFilter
Matches ISpectLogData items whose ISpectLogData.key is in keys .
MultipartCapture
Shared capture budget for multipart request bodies.
MultipartReplayBody
A multipart/form-data payload combining text fields and file parts.
MultipartReplayField
A single text field of a MultipartReplayBody . Field names may repeat,
so parts are modeled as a list rather than a map.
MultipartReplayFile
A single file part of a MultipartReplayBody .
NetworkFilter <T >
Base class for network filter chain units.
NetworkFilterChain <T >
Immutable, ordered chain of NetworkFilter s with short-circuit evaluation.
NetworkInterceptorDefaults
Shared defaults for every ISpect network diagnostics adapter.
NetworkJsonKeys
Canonical JSON key names used across all network interceptor packages.
NetworkLogPayload
Structured request or response data prepared for diagnostic presentation.
NetworkLogPrintOptions
Abstraction describing print preferences and color configuration for
network-related logs.
NetworkLogRenderer
Extracts and formats network diagnostics for console and UI presentation.
NetworkMapRedactor
Standard redaction pipeline for network toJson() maps.
NetworkPayloadSanitizer
Provides reusable sanitization helpers for network payloads.
NetworkReplayBody
Transport-agnostic body of a composed/replayed HTTP request.
NetworkReplayRequest
A transport-agnostic description of an HTTP request to send.
NetworkReplayRequestParser
Reconstructs a NetworkReplayRequest from a captured request map.
NetworkReplayResult
Outcome of sending a NetworkReplayRequest through a NetworkRequestSender .
NetworkRequestSender
Sends a composed/replayed request through a real, app-owned client.
NetworkSenderRegistry
Holds the NetworkRequestSender s registered by the host application.
NetworkTransaction
Groups a correlated HTTP request with its response or error.
NetworkUriSnapshot
Bounded URL and path captured from caller-owned URL text.
PanelAction
One icon action in a DraggableActionPanel grid.
PanelActionButton
One full-width labelled button below the action grid.
PanelBadge
A small count or dot drawn over an action.
PanelBehavior
Which interactions a panel accepts.
PanelEdgeHandle
The grab affordance shown on the sliver of a panel parked at a screen edge.
PanelExtent
How large the panel becomes when expanded.
PanelMotionSpec
Every tunable that decides how the panel moves.
PanelPlacement
Where a panel comes to rest, expressed as an intent rather than pixels.
PanelSemantics
The strings a panel announces to assistive technology.
PanelStatus
A complete, settled description of what the panel is doing.
PanelViewport
The resolved space a floating panel may occupy.
ParsedReplayRequest
The result of reconstructing a NetworkReplayRequest from a captured log,
carrying which values were dropped because they were redacted.
PatternBasedRedaction
Redacts values based on content patterns (tokens, JWTs, base64, binary).
RedactionContext
Provides redaction helpers and configuration to strategies at call-time.
RedactionResult
The outcome of a redaction operation: the redacted data and statistics
about what was redacted.
RedactionService
A configurable service that redacts sensitive values in headers and payloads.
RedactionStats
Lightweight counters tracking what a single redaction traversal redacted.
RedactionStrategy
Redaction strategy interface.
RollingFileLogHistory
SamplingFilter <T >
Logs only every sampleRate -th event (1-based counting).
SearchFilter
Case-insensitive search across all fields of ISpectLogData ,
including nested ISpectLogData.additionalData .
SessionStatistics
Snapshot of session metrics and configuration.
SourceFilter
Matches logs whose TraceKeys.source is in sources .
StashedPlacement
A PanelPlacement parked off-screen against a vertical edge.
StateTracePreparer
Bounds and redacts state-management payloads before they enter a trace.
StatusCodeFilter <T >
Passes only events whose HTTP status code satisfies predicate .
TextReplayBody
A raw text payload sent verbatim.
TraceCategoryIds
Single source of truth for category ID strings.
TraceKeys
Top-level keys in ISpectLogData.additionalData for trace envelope.
TransactionFilter
Matches logs with a specific TraceKeys.transactionId .
TypeFilter
Matches core log kinds in types without reading an overridable
runtimeType getter.
UrlExclusionFilter <T >
Suppresses logging for URLs matching any of excludedPatterns .
Extensions
HistoryListFlutterText
on List <ISpectLogData >
Formats log history for human-readable diagnostic handoff.
ISpectDataX
on ISpectLogData
Utility extensions on ISpectLogData : copy, formatting, cURL generation.
ISpectFlutter
on ISpectLogger
Extension on ISpectLogger for Flutter-specific configurations.
ISpectLogDataSerialization
on ISpectLogData
Extension for ISpectLogData to add serialization support.
ISpectLogDataX
on ISpectLogData
Convenience getters for accessing structured trace data in ISpectLogData .
ISpectLoggerAnalytics
on ISpectLogger
Trace helpers for analytics events (screen views, product impressions, etc.).
ISpectLoggerAuth
on ISpectLogger
Trace helpers for authentication flows (sign-in, sign-out, refresh, etc.).
ISpectLoggerBloc
on ISpectLogger
Trace helpers for BLoC / Cubit lifecycle events.
ISpectLoggerGraphQL
on ISpectLogger
Trace helpers for GraphQL queries, mutations, and subscriptions.
ISpectLoggerGrpc
on ISpectLogger
Trace helpers for gRPC calls.
ISpectLoggerNavigation
on ISpectLogger
Trace helpers for Navigator / router transitions.
ISpectLoggerNetwork
on ISpectLogger
Trace helpers for raw HTTP request / response / error events.
ISpectLoggerPayment
on ISpectLogger
Trace helpers for payment and in-app purchase flows.
ISpectLoggerPerformance
on ISpectLogger
Trace helpers for runtime performance signals (frame jank, slow work).
ISpectLoggerPush
on ISpectLogger
Trace helpers for push / remote notifications.
ISpectLoggerRiverpod
on ISpectLogger
Trace helpers for Riverpod provider lifecycle events.
Trace helpers for Server-Sent Events (SSE) streams.
ISpectLoggerState
on ISpectLogger
Trace helpers for state-management layers (BLoC, Cubit, Riverpod, etc.).
ISpectLoggerStorage
on ISpectLogger
Trace helpers for object-storage / file-storage operations
(S3, Firebase Storage, local fs, etc.).
ISpectLoggerWs
on ISpectLogger
Trace helpers for WebSocket send / receive events.
ISpectStringExtension
on String ?
An extension on nullable String providing truncation.
ISpectTrace
on ISpectLogger
LogLevelX
on LogLevel
SafeLogExtension
on ISpectLogger
Extension on ISpectLogger providing safe logging helpers.
StringBufferExtension
on StringBuffer
Extension on StringBuffer to conditionally write a line.
Functions
base64Placeholder (int length )
→ String
Placeholder for redacted Base64-encoded data, showing approximate length.
binaryPlaceholder (int length )
→ String
Placeholder for redacted binary data, preserving the original byte count.
buildRouteLogMessage ({required TransitionType type , required Route ? route , required Route ? previousRoute , required bool enableArgumentRedaction , required bool globalRedactionEnabled , DiagnosticResourceLimits resourceLimits = DiagnosticResourceLimits.balanced })
→ String
captureISpectLogDataForEgress (ISpectLogData data )
→ ({Map <String , dynamic > ? additionalData , DiagnosticCaptureMode captureMode , Error ? error , String ? errorText , Object ? exception , String ? exceptionText , String id , String ? key , LogLevel ? logLevel , Object ? message , AnsiPen ? pen , DiagnosticResourceLimits resourceLimits , StackTrace ? stackTrace , String ? stackTraceText , DateTime time } )
Reads the package-owned base storage without dispatching through getters
that an external subtype can override.
captureISpectLogWithoutPayload (ISpectLogData data )
→ ({String ? errorText , String ? exceptionText , String ? key , LogLevel ? logLevel , Object ? message , DiagnosticResourceLimits resourceLimits , StackTrace ? stackTrace , String ? stackTraceText , DateTime time } )
Reads every captured field except the payload.
cleanMap (Map <String , Object ? > map )
→ Map <String , Object ? >
Removes entries with null values or empty-string values from map.
containsAnsi (String value )
→ bool
Returns true if value contains any ANSI escape sequence.
debugCheckHasISpectAppLocalizations (BuildContext context )
→ bool
describeRuntimeType (Object ? value , {required DiagnosticCaptureMode captureMode , required String fallback , DiagnosticResourceLimits resourceLimits = DiagnosticResourceLimits.balanced })
→ String
Returns the concrete class name of value, bounded by resourceLimits.
developerLogOutput (String message , {LogLevel ? logLevel , Object ? error , StackTrace ? stackTrace , DateTime ? time })
→ void
Routes message to dart:developer's log() as a single ISpect-tagged
entry, mapping logLevel to its developer-log level.
formatBytes (int bytes )
→ String
Formats a byte count as a human-readable string (B, KB, MB, GB).
generateTraceId ()
→ String
Generates a 16-character hex trace ID from the current timestamp
and a random component.
guardDiagnostics (ISpectLogger logger , void action (), {required String what })
→ void
Runs action and reports a thrown failure as a warning on logger
instead of propagating it into the host application.
lookupISpectGeneratedLocalization (Locale locale )
→ ISpectGeneratedLocalization
maskedDiagnosticField (ISpectLogData data , String key )
→ Object ?
Masks a single captured field without materializing the whole masked map.
maskedDiagnosticFields (ISpectLogData data , Iterable <String > keys )
→ Map <String , Object ? >
Masks the captured values under keys in one pass without materializing
the whole masked map.
normalizeStackTrace (StackTrace ? stackTrace )
→ StackTrace ?
Returns stackTrace as-is unless it is null or StackTrace.empty ,
in which case null is returned.
resetBackground ()
→ String
resetForeground ()
→ String
safeValueTypeLabel (Object ? value , {DiagnosticCaptureMode captureMode = DiagnosticCaptureMode.balanced , DiagnosticResourceLimits resourceLimits = DiagnosticResourceLimits.balanced })
→ String
Returns the concrete class name of value, falling back to a coarse type
family.
samplePass (double ? rate )
→ bool
Returns true when the operation should proceed based on a probabilistic
sampling rate.
stripAnsi (String value )
→ String
Returns value with all ANSI escape sequences removed.
truncateLeaves (Object ? input , {required int maxLength })
→ Object ?
Recursively truncates string leaves in nested Map /Iterable structures.
truncateStackTrace (StackTrace ? stackTrace , {int maxFrames = kDefaultStackFrameLimit })
→ StackTrace ?
Truncates stackTrace to maxFrames frames while keeping it a proper
StackTrace so that tools like Flutter DevTools can still parse and
display clickable frame links.
truncateString (String value , {int maxLength = kDefaultStringTruncateLimit })
→ String
Truncates value to maxLength, avoiding surrogate pair splits.
Typedefs
DiagnosticMasker
= Map <String , dynamic > ? Function(Map <String , dynamic > ? value , DiagnosticResourceLimits resourceLimits )
Masks a bounded diagnostic map on its way to a consumer.
FileLogDirectoryProvider
= Future <String > Function()
Resolves an existing app-private directory for rolling log persistence.
FileLogHistoryErrorHandler
= void Function(FileLogHistoryException error )
ISpectComposerFilePicker
= Future <ComposerPickedFile ? > Function()
Supplies a file for a composed multipart request in the HTTP composer.
ISpectLoadLogContentCallback
= Future <String ? > Function(BuildContext context )
Invoked when the log viewer needs to load log content from an external
source (file picker, clipboard, URL, etc.).
ISpectLogDataBuilder
= Widget Function(BuildContext context , ISpectLogData data )
Signature for build custom ISpectLogData widgets
ISpectLogErrorBuilder
= Widget Function(BuildContext context , ISpectLogError data )
Signature for build custom ISpectLogError
messages in showing Snackbar or another widgets
ISpectLogExceptionBuilder
= Widget Function(BuildContext context , ISpectLogException data )
Signature for build custom ISpectLogException
messages in showing Snackbar or another widgets
ISpectLogOptions
= ISpectErrorHandlerOptions
Renamed to ISpectErrorHandlerOptions in 5.0.0 to disambiguate from
ISpectOptions (UI configuration). Will be removed in 8.0.0.
ISpectMetadataProvider
= FutureOr <ISpectMetadata > Function()
Supplies environment metadata embedded into exported log files.
ISpectObserverDisposer
= void Function()
ISpectOpenFileCallback
= Future <void > Function(String path )
Invoked when the user taps an exported log file path in the viewer.
ISpectPanelBuilder
= Widget Function(BuildContext context , ISpectPanelData data )
Builds the diagnostics panel from the pieces ISpect assembles.
ISpectScope
= ISpectScopeController
Shorter, idiomatic alias for ISpectScopeController .
ISpectSettingsChangedCallback
= void Function(ISpectSettingsState settings )
Called when ISpect settings change (logger options, enabled log types, etc.).
ISpectShareCallback
= Future <void > Function(ISpectShareRequest request )
Invoked when the user shares logs from the inspector panel.
LoggerOutput
= void Function(String message , {Object ? error , LogLevel ? logLevel , StackTrace ? stackTrace , DateTime ? time })
Callback signature for custom log output.
PanelActionBuilder
= Widget Function(BuildContext context , PanelAction action )
Builds one action's cell, replacing ActionCell .
PanelActionButtonBuilder
= Widget Function(BuildContext context , PanelActionButton button )
Builds one button's row, replacing ActionButtonRow .
PanelChildBuilder
= Widget Function(BuildContext context , PanelStatus status )
Builds one of the panel's two faces.
PanelHandleBuilder
= Widget Function(BuildContext context , PanelEdge edge )
Builds the grab affordance shown on a panel parked against edge.