zero_inspector_kit library

Classes

AlertEvent
告警事件 / Alert event
AlertService
告警服务 / Alert service
AlertsViewer
告警查看器 / Alerts viewer
ColumnInfo
列信息模型 / Column info model
ConditionalInspector
条件检查器组件 / Conditional inspector widget 根据编译模式自动决定是否显示检查器 / Automatically determine whether to show inspector based on build mode
ConditionalLogInterceptor
条件日志拦截器 / Conditional log interceptor 在 release 模式下不会执行任何操作 / Won't perform any operation in release mode
DatabaseInfo
数据库信息模型 / Database info model
DatabaseProvider
数据库提供者抽象接口 / Database provider abstract interface
DatabaseRegistry
数据库提供者注册表 / Database provider registry
DatabaseService
数据库服务 / Database service 统一管理所有数据库提供者,提供数据库查询接口 / Unified management of all database providers, providing database query interface
DatabaseViewer
数据库查看器 / Database viewer 显示应用中的所有数据库和表结构,支持搜索和查看表数据 / Display all databases and table structures in the app, support search and viewing table data
ExportService
导出服务 / Export service
FloatingInspectorButton
悬浮检查器按钮 / Floating inspector button
FpsService
FPS 监控服务 / FPS monitoring service
FpsViewer
FPS 查看器(Inspector 面板内详情页)/ FPS viewer (in-panel detail page)
FrameRecord
帧耗时记录 / Frame duration record
HiveBoxAdapter
HiveBoxLike 的默认适配:包裹真实的 Box 实例。 Default adapter wrapping a real Hive Box instance.
HiveBoxLike
一个最小化的 Hive Box 形状契约,仅声明查看所需方法。 插件本身不依赖 hive,用户传入自己持有的 box 实例即可, 自动适配任意 Hive 版本、避免依赖冲突。
HiveProvider
Hive 查看器 Provider。 将一个 Hive Box 呈现为一个「数据库 / 一张表」,复用 DatabaseViewer 的浏览与导出流程。
InspectorDioInterceptor
Dio拦截器实现 / Dio interceptor implementation 捕获Dio网络请求并记录到检查器服务 / Capture Dio network requests and record to inspector service
InspectorDioInterceptorBase
Dio拦截器基类 / Dio interceptor base class 定义Dio拦截器的三个生命周期方法 / Define three lifecycle methods for Dio interceptor
InspectorEnvironment
环境工具类 / Environment utility class 提供编译时配置和环境判断功能 / Provides compile-time configuration and environment judgment
InspectorErrorBoundary
单个检查器 Tab 的错误边界 / Per-tab error boundary
InspectorErrorBoundaryElement
覆写 performRebuild:在边界自身重建期间临时接管 ErrorWidget.builderFlutterError.onError,把子树内的构建异常渲染成该边界的错误卡片,并“吞掉” 对应上报(真正兜底,而非只是换张红色 ErrorWidget 仍抛错)。finally 中还原原函数。 Overrides performRebuild: while this boundary rebuilds, temporarily take over ErrorWidget.builder and FlutterError.onError so build errors inside the subtree render as this boundary's card AND the error report is swallowed (truly contained, instead of just swapping the red ErrorWidget while still throwing). Both hooks are restored in finally.
InspectorHttpInterceptor
HTTP 请求拦截器 / HTTP request interceptor 通过 HttpOverrides 机制实现全局 HTTP 请求拦截 / Implement global HTTP request interception via HttpOverrides mechanism
InspectorInternalLog
Ring-buffer of internal diagnostic logs emitted by Zero Inspector Kit.
InspectorLog
日志记录简化 API / Simplified logging API
InspectorLogInterceptor
日志拦截器类 / Log interceptor class 负责自动捕获应用中的所有日志输出,包括:/ Automatically captures all log outputs in the application, including:
InspectorPanel
检查器面板 / Inspector panel 包含网络、日志、数据库、内存、FPS、路由、告警、Widget 八个查看器 Contains eight viewers: network, logs, database, memory, FPS, routes, alerts, widgets
InspectorRouteObserver
路由观察者 / Route observer 监听应用中的路由导航操作并记录 / Listen to route navigation operations in the app and record them
InspectorService
检查器服务,用于管理所有收集的数据 / Inspector service for managing all collected data
InspectorToast
插件内统一提示(toast)组件。
InspectorWebSocket
可监控的 WebSocket 包装器 / Monitorable WebSocket wrapper
InterceptorRulePanel
拦截规则编辑面板 / Interceptor rule editor panel StatefulWidget 管理内部 controllers 避免焦点丢失 StatefulWidget manages internal controllers to prevent focus loss
InternalLogEntry
A single internal diagnostic record kept for in-inspector debugging.
LogEntry
日志条目模型 / Log entry model
LogViewer
日志查看器 / Log viewer 显示所有捕获的日志,支持按级别/标签过滤、正则搜索、自动滚动与单条复制。 Display all captured logs with level/tag filtering, regex search, auto-scroll and per-entry copy.
MemoryInspectorService
内存检查服务 / Memory inspector service
MemoryViewer
内存查看器 / Memory viewer
NetworkRequest
网络请求模型 / Network request model
NetworkTimeline
网络请求瀑布图 / Network request waterfall (timeline).
NetworkViewer
QueryResult
查询结果模型 / Query result model
RequestInterceptorRule
请求拦截规则模型 / Request interceptor rule model
RouteEntry
路由条目模型 / Route entry model
RouteViewer
路由查看器 / Route viewer 显示应用中的路由导航记录 / Display route navigation records in the app
SharedPreferencesAdapter
SharedPrefsLike 的默认适配:包裹真实的 SharedPreferences 实例。 Default adapter wrapping a real SharedPreferences instance.
SharedPrefsLike
一个最小化的 SharedPreferences 形状契约,仅声明查看所需方法。 插件本身不依赖 shared_preferences,用户传入自己持有的实例即可, 从而自动适配任意版本、避免依赖冲突。
SharedPrefsProvider
SharedPreferences 查看器 Provider。 将一组键值对呈现为一个「数据库 / 一张表」,复用 DatabaseViewer 的浏览与导出流程。
SqliteDatabaseProvider
SQLite数据库提供者实现 / SQLite database provider implementation 自动扫描应用目录下的.db和.sqlite文件 / Auto-scan .db and .sqlite files in application directory
TableInfo
数据表信息模型 / Table info model
WidgetTreeInspector
Widget 检查器 / Widget inspector.
WidgetTreeService
Widget 树检查器开关服务 / Widget tree inspector toggle service.
WsFrame
单帧记录(WebSocket 抓取) / A single captured WebSocket frame
WsInspectorService
WebSocket / gRPC 等流式协议抓取服务 / Streaming-protocol capture service (WebSocket / gRPC, etc.)
ZeroInspectorKit
ZeroInspectorKit 插件入口类 / ZeroInspectorKit plugin entry class 提供一键初始化和应用包装功能,实现零侵入集成 / Provides one-click initialization and app wrapping for zero-invasion integration
ZeroInspectorKitPlatform
ZeroInspectorKit平台接口基类 / ZeroInspectorKit platform interface base class 定义平台相关的抽象方法,各平台实现需继承此类 / Define platform-related abstract methods, platform implementations must extend this class

Enums

InternalLogLevel
Severity levels for internal diagnostic logging.
LogLevel
日志级别枚举 / Log level enumeration
RouteAction
路由操作类型枚举 / Route action type enumeration
StatusGroup
状态码分组(用于「按状态码区间筛选」维度)。 Status-code groups (for the "filter by status-code range" dimension).
WsFrameType
WebSocket 帧类型 / WebSocket frame type

Extensions

MemoryLeakTrackingExtension on Object
Object 扩展:提供链式/更短的泄漏追踪调用 / Object extension: provide chained/shorter leak tracking calls

Properties

wsHandshakeZoneKey Object
Zone 标记键:当前连接是 WebSocket 握手。 由 InspectorWebSocket.connect 在调用 WebSocket.connect 时用 runZoned 设置, 拦截器的 openUrl 据此跳过对握手原始 HTTP GET 的记录(它由 WsInspectorService 以 WS 条目单独记录,避免成功时刷屏、失败时漏成 OS Error status -1 的 GET)。 Zone key marking the current connection as a WebSocket handshake. Set by InspectorWebSocket.connect via runZoned around WebSocket.connect, so the interceptor's openUrl skips recording the raw handshake GET (it is recorded separately as a WS entry by WsInspectorService).
final

Functions

runInspectorApp(VoidCallback appRunner) → void
使用检查器 Zone 运行应用 / Run app with inspector Zone 通过 ZoneSpecification 捕获所有 print() 调用 / Capture all print() calls via ZoneSpecification appRunner 应用运行回调 / App runner callback
trackMemoryLeak(Object object, {String? tag, Duration? expectedReleaseAfter}) int
内存泄漏追踪简化 API / Simplified memory leak tracking API
untrackMemoryLeak(Object objectOrId) → void
取消对象的泄漏追踪 / Cancel leak tracking for an object