flutter_inspector_kit library
Classes
- DatabaseBrowserSource
- An abstract interface representing a browseable database source.
- DatabaseTableInfo
- Metadata about a database table.
- DatabaseTablePage
- A page of rows returned from a database table query.
- DiagnosticInfo
- Device and app metadata shown in the header of a diagnostic report.
- DiagnosticInfoSource
- Supplies device and app metadata for diagnostic reports.
- FlutterInspector
- The core entry point for the Flutter Inspector.
- FlutterInspectorDioInterceptor
- A Dio interceptor that automatically records requests and responses to the FlutterInspector.
- FlutterInspectorMagicalTap
- A widget that detects a specific number of rapid consecutive taps.
- KeyValueBrowserSource
- An abstract interface representing a browseable key-value store.
- KeyValueEntry
- A single key-value pair read from a KeyValueBrowserSource.
- LogEntry
- An immutable record of a single console log, displayed in the Console tab.
- NetworkEntry
- An immutable record of an HTTP request/response, displayed in the Network tab.
- TimestampedEntry
- 統一的排序契約:所有可進時序軸的 entry 都暴露一個 timestamp。
- WebViewBridgeAdapter
- Translates decoded WebView bridge messages into existing LogEntry / NetworkEntry and hands them to the existing registry. A translator, not a system: it holds no buffer, does no redaction, renders no UI.
Enums
- DatabaseOperation
- The kind of database operation recorded by the Database inspector.
- KeyValueType
- The value types a key-value store can hold.
- LogLevel
- Severity level for a console log entry.
- NetworkOrigin
- Where a NetworkEntry was captured from.
- TimelineSource
-
時序軸的來源類別,用於
mergedTimeline過濾與 console_tab filter chip。
Extensions
Constants
- inspectorWebViewBridgeJs → const String
-
JavaScript payload injected into a WebView page to bridge its
console.*,window.onerror,unhandledrejection,fetchandXMLHttpRequestactivity back to the host app as a single JSON string per event, via kWebViewBridgeChannelName. - kNetworkBodyMaxLength → const int
- Maximum number of bytes (characters) retained for a request/response body before truncation. Bodies larger than this are cut and marked.
- kTruncatedMarker → const String
- Marker appended to a body that has been truncated.
- kWebViewBridgeChannelName → const String
- Name of the JavaScript channel / handler the injected bridge posts to.
Functions
-
buildLogOneLiner(
LogEntry entry) → String -
Pure formatting helpers for the Console inspector. No Flutter dependencies,
so everything here is unit-testable in isolation.
Projects
entryonto a single dense line for the diagnostic report's## Timelinesection:[HH:mm:ss.mmm] [LOG/{level}] {message}. -
buildLogPlainText(
LogEntry entry, {bool isConcise = true}) → String -
Builds a full plain-text export of
entrycovering general info, stack trace, and data sections. -
normalizeStackTrace(
String rawStack) → String - Normalizes a stack trace string by collapsing consecutive framework-internal frames and converting asynchronous suspension gaps into a readable format.
-
parseKeyValueInput(
String input, KeyValueType type) → Object? -
Parses user-typed
inputintotype, or returns null if it cannot.