-
Notifications
You must be signed in to change notification settings - Fork 3
FAQ
A: No. The inspector is automatically disabled in release mode via kReleaseMode. Flutter's tree-shaking removes all inspector-related code from production builds. You don't need to remove any code.
不会。 检查器在 release 模式下通过 kReleaseMode 自动禁用。Flutter 的 tree-shaking 会移除所有检查器相关代码,无需手动移除。
A: Android, iOS, Linux, macOS, and Windows. Desktop platforms require sqflite_common_ffi for database support.
支持 Android、iOS、Linux、macOS 和 Windows。桌面平台需要 sqflite_common_ffi 来支持数据库功能。
A: Flutter >= 3.3.0, Dart SDK >= 3.11.0 < 4.0.0.
Flutter >= 3.3.0,Dart SDK >= 3.11.0 < 4.0.0。
A: No. Dio uses IOHttpClientAdapter internally, which uses dart:io's HttpClient. The inspector captures all requests via HttpOverrides automatically, making it truly zero-invasion for both http package and Dio.
不需要。 Dio 内部使用 IOHttpClientAdapter,底层使用 dart:io 的 HttpClient。检查器通过 HttpOverrides 自动捕获所有请求,对 http 包和 Dio 都是真正的零侵入。
A: If you use both InspectorDioInterceptor and the auto-capture (HttpOverrides), Dio requests will be recorded twice. Simply remove the manual InspectorDioInterceptor — auto-capture handles everything.
如果同时使用了 InspectorDioInterceptor 和自动捕获(HttpOverrides),Dio 请求会被记录两次。移除手动 InspectorDioInterceptor 即可,自动捕获会处理一切。
A: Yes! The inspector automatically captures logs from any library that uses print() or debugPrint(). No configuration needed. Third-party logs are categorized as Info level.
可以! 检查器会自动捕获任何使用 print() 或 debugPrint() 的日志库的日志,无需配置。第三方日志统一归类为 Info 级别。
A: Use the onLogCaptured callback:
使用 onLogCaptured 回调:
InspectorLogInterceptor.instance.onLogCaptured = (entry) {
yourLogger.log(entry.message);
};Warning: Do NOT call
print()or logging methods inside this callback, as it will cause infinite recursion. 警告:不要在此回调中调用print()或日志方法,否则会导致无限递归。
A: The inspector scans getApplicationDocumentsDirectory() and getDatabasesPath() for .db and .sqlite files. If your database is stored elsewhere, you can implement a custom DatabaseProvider.
检查器扫描 getApplicationDocumentsDirectory() 和 getDatabasesPath() 目录中的 .db 和 .sqlite 文件。如果你的数据库存储在其他位置,可以实现自定义 DatabaseProvider。
A: Yes, but you need to initialize sqflite_common_ffi first:
可以,但需要先初始化 sqflite_common_ffi:
sqfliteFfiInit();
databaseFactory = databaseFactoryFfi;A: This was fixed in v1.0.6. The floating button and panel are rendered via Overlay, which is independent of the page layout and not affected by keyboard.
此问题已在 v1.0.6 修复。悬浮按钮和面板通过 Overlay 渲染,独立于页面布局,不受键盘影响。
A: Each viewer has its own search bar at the top. Database viewer has two-level search: global search (database list) and in-database search (table names + all column data).
每个查看器顶部都有搜索栏。数据库查看器有双层搜索:全局搜索(数据库列表)和数据库内搜索(表名 + 所有列数据)。
A: This project is licensed under GPL-3.0. You can use it freely, but any modified commercial distribution must also be open-source under GPL-3.0.
本项目采用 GPL-3.0 许可证。可以自由使用,但修改后的商业分发也必须在 GPL-3.0 下开源。