DevConsole class

开发控制台插件

提供日志管理、接口监听和埋点调试功能

Properties

apiMonitor ↔ ApiMonitor
API监听器实例
latefinal
eventTracker ↔ EventTracker
埋点事件追踪器实例
latefinal
hashCode int
The hash code for this object.
no setterinherited
logManager ↔ LogManager
日志管理器实例
latefinal
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

clearApiRequests() → void
清除所有API请求记录
clearEvents() → void
清除所有埋点事件
clearLogs() → void
清除所有日志
dismiss(BuildContext context) → void
关闭开发控制台
dispose() → void
释放资源
getApiLogger() ApiLogger
获取API日志记录器
getApiRequests() List<Map<String, dynamic>>
获取所有API请求记录
getEvents() List<Map<String, dynamic>>
获取所有埋点事件
getLogs() List<Map<String, dynamic>>
获取所有日志
initialize({int maxLogCount = 500, int maxRequestCount = 100, int maxEventCount = 100, DevConsoleTheme? theme, bool enableInRelease = false}) → void
初始化开发控制台
log(String message, {LogLevel level = LogLevel.info, String? tag, StackTrace? stackTrace, Object? error}) → void
添加日志
logApiRequest(String url, String method, {Map<String, dynamic>? headers, dynamic data, Map<String, dynamic>? queryParameters, int? statusCode, dynamic response, String? error, RequestStatus status = RequestStatus.success, DateTime? startTime}) → void
添加API请求记录
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
setEventDataSource(List<Map<String, dynamic>> dataSource()) → void
设置事件数据源
setEventStream(Stream<List<Map<String, dynamic>>> eventStream) → void
设置事件流
show(BuildContext context) → void
显示开发控制台
toString() String
A string representation of this object.
inherited
trackEvent(String eventName, {Map<String, dynamic>? parameters, String? category}) → void
添加埋点事件

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Properties

instance DevConsole
单例实例
final